How to jump to an HTML page from Lightswitch
-
27-10-2019 - |
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?
Solution
- Switch to File View
- Add a reference in the Client project to System.Windows.Browser
- 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