Add window close button to WinUI 3 sample
このコミットが含まれているのは:
1 親
8bd69672a9
コミット
7b070bc87f
2ファイル変更
+18
検索条件に一致するファイルはありません
@@ -206,6 +206,18 @@
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!--Close button-->
|
||||
<Button
|
||||
Padding="20"
|
||||
Margin="48"
|
||||
CornerRadius="9999"
|
||||
ToolTipService.ToolTip="Close"
|
||||
Click="CloseButton_Click"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Right">
|
||||
<SymbolIcon Symbol="Cancel"/>
|
||||
</Button>
|
||||
|
||||
<!--Invisible title bar-->
|
||||
<Rectangle
|
||||
|
||||
@@ -35,4 +35,10 @@ public sealed partial class MainWindow : Window
|
||||
{
|
||||
ShadersListContainerPanel.Height = Math.Round(e.Size.Height * 0.35);
|
||||
}
|
||||
|
||||
// Closes the app
|
||||
private void CloseButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Application.Current.Exit();
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする