Last active
December 14, 2016 17:18
-
-
Save jamesmcroft/bdcb8d02102b06aae0a5cbcbe0620260 to your computer and use it in GitHub Desktop.
Opens a page as a new window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void OnOpenWindowClicked(object sender, RoutedEventArgs e) | |
{ | |
await WindowHelper.CreateNewWindowForPageAsync(typeof(WindowHelperPageOne)); | |
await WindowHelper.CreateNewWindowForPageAsync(typeof(WindowHelperPageOne), new Size(640, 480)); | |
await WindowHelper.CreateNewWindowForPageAsync(typeof(WindowHelperPageOne), new MainPageViewModel()); | |
await WindowHelper.CreateNewWindowForPageAsync(typeof(WindowHelperPageOne), new MainPageViewModel(), new Size(640, 480)); | |
// Also available with type name string. | |
await WindowHelper.CreateNewWindowForPageAsync("WinUX.Pages.WindowHelperPageOne, WinUX"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment