Is there a way to render WPF controls on top of the wpf WebBrowser control?

后端 未结 6 882
长情又很酷
长情又很酷 2020-12-16 03:51

I need an embedded WebBrowser control in my application, and am having problems displaying WPF content on top of it. The application will sometimes show popups for editing d

6条回答
  •  醉话见心
    2020-12-16 03:58

    Embedded WebBrowsers suck, unfortunately. If you're displaying actual, real, dynamic web content in your WebBrowser, you have to go through the pain of linking another Window to your hosted WebBrowser's window, and handling moving/resizing/et al yourself. I haven't seen another way that works.

    If you're displaying static content (or content from a source that you can control or influence), you might consider displaying, say, RTF docs in a DocumentViewer instead, which doesn't have the icky airspace issues of the WebBrowser control.

提交回复
热议问题