-
Notifications
You must be signed in to change notification settings - Fork 1
UWP 子ウィンドウ
hikari edited this page Dec 17, 2021
·
1 revision
アプリ名 (Universal Windows) を右クリックし、追加、新しい項目、空白のページを選択
<Button Content="Standard XAML button" Click="Method_Name" />
private async void Method_Name(object sender, RoutedEventArgs e)
{
var frame = new BlankPage1(); // 開かれるウィンドウのクラスを指定
var appWindow = await AppWindow.TryCreateAsync();
ElementCompositionPreview.SetAppWindowContent(appWindow, frame);
await appWindow.TryShowAsync();
}