-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathWndMenuDesigner.xaml
More file actions
103 lines (93 loc) · 6.3 KB
/
WndMenuDesigner.xaml
File metadata and controls
103 lines (93 loc) · 6.3 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<Window x:Class="WndMenuDesigner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Menu Designer" Height="600" Width="900" WindowStartupLocation="CenterScreen"
PreviewKeyDown="Window_PreviewKeyDown" Background="AliceBlue"
Closing="Window_Closing">
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Menu x:Name="MainMenu" DockPanel.Dock="Top"/>
<StackPanel Orientation="Vertical" DockPanel.Dock="Bottom" VerticalAlignment="Bottom">
<ToggleButton x:Name="RtlToggleButton" Padding="10,5"
HorizontalAlignment="Center" Background="Gold"
Checked="RtlToggleButton_Checked"
Unchecked="RtlToggleButton_Unchecked">Right To Left</ToggleButton>
<Border Margin="20" Background="LightCyan" BorderThickness="1" BorderBrush="Black">
<TextBlock x:Name="TbInfo" Margin="10" Foreground="Brown" >
<Bold>Notes:</Bold><LineBreak/>
   * Click any menu item to select it.<LineBreak/>
   * Use keyboard arrows to move between menu items.<LineBreak/>
   * Use Ctrl + keyboard arrows to change the current meun item position.
</TextBlock>
</Border>
<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Center" >
<Button x:Name="BtnAddNext" Width="200" Margin="10,5" Click="BtnAddNext_Click">Add Next Item (F3)</Button>
<Button x:Name="BtnAddChild" Width="200" Margin="10,5" Click="BtnAddChild_Click">Add A Child Item (F4)</Button>
<Button x:Name="BtnAddSep" Width="200" Margin="10,5" Click="BtnAddSep_Click">Add A Separator</Button>
<Button x:Name="BtnDelete" Width="200" Margin="10,5" Click="BtnDelete_Click">Delete Menu Item</Button>
</StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition/>
<ColumnDefinition Width="60"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Margin="15,5,0,5">Name:</TextBlock>
<TextBox x:Name="TxtName" Grid.Column="1" Margin="5,5,15,5"
PreviewKeyDown="TxtName_PreviewKeyDown"
LostFocus="TxtName_LostFocus"
GotFocus="TxtName_GotFocus"
TextChanged="TxtName_TextChanged"
PreviewMouseLeftButtonUp="Controls_GotFocus"/>
<TextBlock Grid.Column="2" Margin="5,5,0,5">Text:</TextBlock>
<TextBox x:Name="TxtText" Grid.Column="3" Margin="5,5,15,5"
PreviewKeyDown="TxtText_PreviewKeyDown"
LostFocus="TxtText_LostFocus"
GotFocus="TxtText_GotFocus"
PreviewMouseLeftButtonUp="Controls_GotFocus"/>
<GroupBox x:Name="GrpShortcut" Grid.Row="1" Grid.ColumnSpan="2" Margin="15,5" Header="Shortcut: " BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left">
<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Center" >
<CheckBox x:Name="ChkCtrl" Margin="15, 0, 0, 0" Content="Ctrl"
Checked="OnShortcutChanged" Unchecked="OnShortcutChanged"
GotFocus="Controls_GotFocus"
PreviewMouseLeftButtonUp="Controls_GotFocus"/>
<CheckBox x:Name="ChkShift" Margin="15, 0, 0, 0" Content="Shift"
Checked="OnShortcutChanged" Unchecked="OnShortcutChanged"
GotFocus="Controls_GotFocus"
PreviewMouseLeftButtonUp="Controls_GotFocus"/>
<CheckBox x:Name="ChkAlt" Margin="15, 0" Content="Alt"
Checked="OnShortcutChanged" Unchecked="OnShortcutChanged"
GotFocus="Controls_GotFocus"
PreviewMouseLeftButtonUp="Controls_GotFocus"/>
<TextBlock Margin="15, 0, 0, 0">Key:</TextBlock>
<ComboBox x:Name="CmbKeys" Width="130" Margin="5,0,15,0"
SelectionChanged="OnShortcutChanged"/>
</StackPanel>
</GroupBox>
<GroupBox x:Name="GrpCheck" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Margin="5,5" Header="Check State: " BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" >
<CheckBox x:Name="ChkCheckable" Margin="25, 0, 0, 0" VerticalAlignment="Center"
Checked="ChkCheckable_Checked" Unchecked="ChkCheckable_Checked"
GotFocus="Controls_GotFocus"
PreviewMouseLeftButtonUp="Controls_GotFocus">Checkable</CheckBox>
<CheckBox x:Name="ChkChecked" Margin="27, 0, 25, 0" VerticalAlignment="Center"
Checked="ChkChecked_Checked" Unchecked="ChkChecked_Checked"
GotFocus="Controls_GotFocus"
PreviewMouseLeftButtonUp="Controls_GotFocus">Checked</CheckBox>
</StackPanel>
</GroupBox>
</Grid>
<StackPanel Margin="30" Orientation="Horizontal" HorizontalAlignment="Center" >
<Button x:Name="BtnOk" Width="120" Margin="10,5" IsDefault="True" Click="BtnOk_Click">OK</Button>
<Button x:Name="BtnCancel" Width="120" Margin="10,5" IsCancel="True" Click="BtnCancel_Click">Cancel</Button>
</StackPanel>
</StackPanel>
</DockPanel>
</Window>