问题
The hierarchy is as follows
<Grid>
<WebBrowser ></WebBrowser>
</Grid>
Now I want to add another child to the Grid which will be shown as a PopUp. This works everywhere but when we have a WebBrowser as a child in the Grid it is not working.
回答1:
Unfortunately, its not possible with Webbrowser Control in WPF.
WebBrowser control what you are using is not an actual WPF control. Its just a wrapped winforms webcontrol . Its impossible to show the WPF content on top of it.
Similar questions in SO where you can see for workaround:
Is there a way to render WPF controls on top of the wpf WebBrowser control?
Make WPF control over the web browser
来源:https://stackoverflow.com/questions/35547690/how-to-open-user-control-as-popup-on-top-of-webbrowser-wpf