Articles → LIGHT SWITCH 2011 → Open A Link In New Browser Window In Lightswitch 2011
Open A Link In New Browser Window In Lightswitch 2011
Software Requirement
- Visual studio 2010 is installed on your machine.
- Visual Studio 2010 service pack 1 is installed on your machine.
- Microsoft Visual Studio Light switch 2011 is installed on your machine.
Prerequisite Knowledge
- What is lightswitch?
- How to create buttons?
- What is Execute() method of button?
- What is HTML DOM?
- What is dispatcher and why we use it?
- How to create lightswitch screens?
Assembly Required
Namespace Required
- Microsoft.LightSwitch.Threading
- System.Windows.Browser
What Is Htmlpage Class?
Implementation
Dispatchers.Main.BeginInvoke(() = >{
var uri = new Uri("http://google.com", UriKind.RelativeOrAbsolute);
HtmlPage.Window.Navigate(uri, "_blank");
});
Running The Code Without Dispatcher
Output
Click to Enlarge