Articles → LIGHT SWITCH 2011 → Close browser window in lightswitch 2011

Close browser window in lightswitch 2011
























Software requirement













Prerequisite knowledge











Steps of execution

















Create a new project





Click to Enlarge


Add a new screen





Click to Enlarge


Add assembly and namespace





Click to Enlarge


Add a button





Click to Enlarge


Write code to close browser window




partial void CloseButton_Execute() {
	Dispatchers.Main.BeginInvoke(() = >{
		// Write your code here.
		System.Windows.Browser.HtmlPage.Window.Invoke("close");
	});
}



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, August 05, 2013

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250