开发者

Capture hyperlink click in HTML displayed in WPF Frame

and sorry if that was asked before,

With a WPF Frame Control I can display a website. WPF appears to delegate Rendering to the resident IE installation.

Unfortunately it appears that when I click some link in the displayed page, WPF does not register this as Navigation, e.g. Navigating event doesn't fire. I can al开发者_StackOverflow中文版most imagine why it doesn't work, yet I am asking the SO hive whether it knows of any possibility to capture navigation within the "embedded browser" after all...


Well, no answers? Here's what I've found out so far

  • With Frame I'm out of luck to catch such an event
  • With the <WebBrowser> Control, clicks posts etc. are registered by the 'Navigating' event (it appears that a refresh not, but I'm not that sure)
  • The WebBrowser's Source, unlike the Frame's counterpart, is not a depenedncy property, i.e. I cannot bind it to a ViewModel Uri. The clumsy resolution is to set the Source programmatically.

The WebBrowser isn't much more than an embedded IE with some adorning functionality. If somebody rather wants to embed Chrome, this is also possible wit the WPF Chromium project

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜