Overlay for managing WebBrowser in a WPF application?

can someone give me a hint how to display “overlay controls” in a webbrowser control in my WPF application? I would like to display the navigation graph as an overlay so that the user can select a function and the navigation controls disappear after selecting it.

currently not working in WPF. :( I have no idea where to start. Any hint or link would be great. thanks

+3
source share
4 answers

There will be problems with this. There are airspace issues with WPF browser control. basically, this means that you cannot put anything on top of the browser guide.

bypasses to put your overlay controls in the context menu.

+4
source

There is a wpf-based browser that uses Chromium. This should allow you to treat it like any other wpf object, not an activex control.

0
source

, . , WinForm WindowsFormsHost .

WindowsFormsHost -.

, , , .

0

- WPF. - , .

. .

, - Mainwindow. - , : , , MainWindow. - Airspace - .

FIX: standard fix - you can set the height of the web browser to zero when you run some other control over it, depending on your scenario. The following is an example implementation.

MainWindow.Xaml includes events.

Activated="Window_Activated"
Deactivated="Window_Deactivated"

In Xaml.cs, it processes the script by setting the height.

private void Window_Activated(object sender, EventArgs e)
{
    wb.Height = double.NaN;
}

private void Window_Deactivated(object sender, EventArgs e)
{
    wb.Height = 0;
}
0
source

Source: https://habr.com/ru/post/1719441/


All Articles