-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathMainWindow.xaml
51 lines (48 loc) · 2.57 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<Window
x:Class="WinUIAppEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUIAppEditor"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Grid.Resources>
<StandardUICommand x:Name="openCommand" ExecuteRequested="{x:Bind OnOpen}" Kind="Open" AccessKey="O" />
<StandardUICommand x:Name="saveCommand" ExecuteRequested="{x:Bind OnSave}" Kind="Save" AccessKey="S" />
<StandardUICommand x:Name="closeCommand" Kind="Close" ExecuteRequested="{x:Bind OnClose}" AccessKey="X" />
<XamlUICommand x:Name="openDotnetCommand" ExecuteRequested="{x:Bind OnOpenDotnet}" Label="Open .NET">
<XamlUICommand.IconSource>
<SymbolIconSource Symbol="OpenFile" />
</XamlUICommand.IconSource>
<XamlUICommand.KeyboardAccelerators>
<KeyboardAccelerator Key="F2" Modifiers="Control" />
</XamlUICommand.KeyboardAccelerators>
</XamlUICommand>
<XamlUICommand x:Name="saveDotnetCommand" ExecuteRequested="{x:Bind OnSaveDotnet}" Label="Save .NET">
<XamlUICommand.IconSource>
<SymbolIconSource Symbol="Save" />
</XamlUICommand.IconSource>
<XamlUICommand.KeyboardAccelerators>
<KeyboardAccelerator Key="F3" Modifiers="Control" />
</XamlUICommand.KeyboardAccelerators>
</XamlUICommand>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<MenuBar>
<MenuBarItem Title="File" AccessKey="F">
<MenuFlyoutItem Command="{StaticResource openCommand}" />
<MenuFlyoutItem Command="{StaticResource saveCommand}" />
<MenuFlyoutSeparator />
<MenuFlyoutItem Command="{StaticResource openDotnetCommand}" />
<MenuFlyoutItem Command="{StaticResource saveDotnetCommand}" />
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="Exit" Command="{StaticResource closeCommand}" />
</MenuBarItem>
</MenuBar>
<TextBox Grid.Row="1" x:Name="text1" AcceptsReturn="True" TextReadingOrder="Default" HorizontalTextAlignment="Left" Margin="10" />
</Grid>
</Window>