Silverlight application in WPF WebBrowser?

I have a promising trivial question. My company is currently working with a rather obscure language (SyngergyDE), and we need to name the SilverLight application inside our product. Unfortunately, this obscure third-party language only (currently) supports opening WPF screens. So I said that I developed a small WPF user control containing a "WebBrowser" control and navigate to the Silverlight application URI. This works great and I can see the SL application. Here is my question: we have a Close button in the SL application, and when users click this button, we want to close the window.

Does anyone have any suggestions on how we can associate the "Close SL Application" with the WPF user control so that all WPF user control is closed?

Thanks everyone

-Tom

+5
source share
2 answers

Attach an event handler to the event WebBrowser.Navigated.

Use the close button in a Silverlight application: -

 HtmlPage.Window.Navigate(new Uri("about:blank", UriKind.Absolute));

When the Navigated event fires in WPF with the URL "about: blank", then its time to close the control.

+1
source

Use Javascript and HTML DOM as glue here.

, SL, Silverlight Javascript, , , - HTML.

WPF HTML + Javascript HTML-, .

0

All Articles