How to open User control as Popup on top of webbrowser WPF

喜欢而已 提交于 2019-12-12 06:17:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!