Question

In Silverlight, I can use

System.Windows.Browser.HtmlPage.Navigate("url");

to navigate to an HTML page. I'm trying to do the same from a Lightswitch application, but I don't know how to get a hold of the HtmlPage (say, from inside my custom window that derives from

Microsoft.LightSwitch.Runtime.Shell.Framework.ScreenChildWindow

, or from a global command that derives from

Microsoft.LightSwitch.Runtime.Shell.ViewModels.Commands

).

Any ideas?

Was it helpful?

Solution

  1. Switch to File View
  2. Add a reference in the Client project to System.Windows.Browser
  3. In the modal window's code, or in the command's code, use HtmlPage.Navigate("url_of_html_page")

Here's a sample that uses the same method: http://code.msdn.microsoft.com/Add-URL-To-LightSwitchs-0f74eef4

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top