I want to open browser window instead of new tab in current/default browser.
I am using this code in desktop client on screen command button click event.
Microsoft.LightSwitch.Threading.Dispatchers.Main.BeginInvoke(() =>
{
if (AutomationFactory.IsAvailable)
{
dynamic shell = AutomationFactory.CreateObject("Shell.Application");
shell.ShellExecute("http://localhost:55722/Home/Index");
}
else if (!System.Windows.Application.Current.IsRunningOutOfBrowser)
{
HtmlPage.Window.Navigate(new Uri("http://localhost:55722/Home/Index"), "_blank");
}
else
{
throw new InvalidOperationException();
}
});
This code is opening my page in current/opened browser tab.
Can you please advice how to open browser window in desktop client on screen command button click event.
Your answer will appreciable! :)
Thanks,
Jatin