|
1 | 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:controlzex="urn:controlzex" |
3 | 4 | xmlns:mah="clr-namespace:MahApps.Metro.Controls" |
4 | | - xmlns:mahConverters="clr-namespace:MahApps.Metro.Converters" |
5 | | - xmlns:controlzex="urn:controlzex"> |
| 5 | + xmlns:mahConverters="clr-namespace:MahApps.Metro.Converters"> |
6 | 6 |
|
7 | 7 | <!-- WindowButtonCommands control templates --> |
8 | 8 |
|
9 | 9 | <ControlTemplate x:Key="MahApps.Templates.WindowButtonCommands" TargetType="{x:Type mah:WindowButtonCommands}"> |
10 | 10 | <StackPanel Orientation="Horizontal"> |
11 | 11 | <Button x:Name="PART_Min" |
12 | | - AutomationProperties.AutomationId="Minimize" |
13 | | - AutomationProperties.Name="Minimize" |
14 | 12 | controlzex:NonClientControlProperties.ClickStrategy="MouseEvent" |
15 | 13 | controlzex:NonClientControlProperties.HitTestResult="MINBUTTON" |
| 14 | + AutomationProperties.AutomationId="Minimize" |
| 15 | + AutomationProperties.Name="Minimize" |
16 | 16 | Command="{x:Static SystemCommands.MinimizeWindowCommand}" |
17 | 17 | Focusable="False" |
18 | 18 | IsEnabled="{Binding IsMinButtonEnabled, RelativeSource={RelativeSource AncestorType={x:Type mah:MetroWindow}}}" |
|
35 | 35 | SnapsToDevicePixels="True" /> |
36 | 36 | </Button> |
37 | 37 | <Button x:Name="PART_Max" |
38 | | - AutomationProperties.AutomationId="MaximizeRestore" |
39 | | - AutomationProperties.Name="Maximize" |
40 | 38 | controlzex:NonClientControlProperties.ClickStrategy="MouseEvent" |
41 | 39 | controlzex:NonClientControlProperties.HitTestResult="MAXBUTTON" |
| 40 | + AutomationProperties.AutomationId="MaximizeRestore" |
| 41 | + AutomationProperties.Name="Maximize" |
42 | 42 | Command="{x:Static SystemCommands.MaximizeWindowCommand}" |
43 | 43 | Focusable="False" |
44 | 44 | IsEnabled="{Binding IsMaxRestoreButtonEnabled, RelativeSource={RelativeSource AncestorType={x:Type mah:MetroWindow}}}" |
|
65 | 65 | SnapsToDevicePixels="True" /> |
66 | 66 | </Button> |
67 | 67 | <Button x:Name="PART_Close" |
68 | | - AutomationProperties.AutomationId="Close" |
69 | | - AutomationProperties.Name="Close" |
70 | 68 | controlzex:NonClientControlProperties.ClickStrategy="MouseEvent" |
71 | 69 | controlzex:NonClientControlProperties.HitTestResult="CLOSE" |
| 70 | + AutomationProperties.AutomationId="Close" |
| 71 | + AutomationProperties.Name="Close" |
72 | 72 | Command="{x:Static SystemCommands.CloseWindowCommand}" |
73 | 73 | Focusable="False" |
74 | 74 | IsEnabled="{Binding RelativeSource={RelativeSource AncestorType={x:Type mah:MetroWindow}}, Path=IsCloseButtonEnabled, Mode=OneWay}" |
|
134 | 134 | <StackPanel Orientation="Horizontal"> |
135 | 135 | <Button x:Name="PART_Min" |
136 | 136 | Width="46" |
| 137 | + controlzex:NonClientControlProperties.ClickStrategy="MouseEvent" |
| 138 | + controlzex:NonClientControlProperties.HitTestResult="MINBUTTON" |
137 | 139 | AutomationProperties.AutomationId="Minimize" |
138 | 140 | AutomationProperties.Name="Minimize" |
139 | 141 | Command="{x:Static SystemCommands.MinimizeWindowCommand}" |
140 | | - controlzex:NonClientControlProperties.ClickStrategy="MouseEvent" |
141 | | - controlzex:NonClientControlProperties.HitTestResult="MINBUTTON" |
142 | 142 | Focusable="False" |
143 | 143 | IsEnabled="{Binding IsMinButtonEnabled, RelativeSource={RelativeSource AncestorType={x:Type mah:MetroWindow}}}" |
144 | 144 | ToolTip="{Binding Minimize, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" |
|
168 | 168 | </Button> |
169 | 169 | <Button x:Name="PART_Max" |
170 | 170 | Width="46" |
171 | | - AutomationProperties.AutomationId="MaximizeRestore" |
172 | | - AutomationProperties.Name="Maximize" |
173 | 171 | controlzex:NonClientControlProperties.ClickStrategy="MouseEvent" |
174 | 172 | controlzex:NonClientControlProperties.HitTestResult="MAXBUTTON" |
| 173 | + AutomationProperties.AutomationId="MaximizeRestore" |
| 174 | + AutomationProperties.Name="Maximize" |
175 | 175 | Command="{x:Static SystemCommands.MaximizeWindowCommand}" |
176 | 176 | Focusable="False" |
177 | 177 | IsEnabled="{Binding IsMaxRestoreButtonEnabled, RelativeSource={RelativeSource AncestorType={x:Type mah:MetroWindow}}}" |
|
204 | 204 | </Button> |
205 | 205 | <Button x:Name="PART_Close" |
206 | 206 | Width="46" |
207 | | - AutomationProperties.AutomationId="Close" |
208 | | - AutomationProperties.Name="Close" |
209 | 207 | controlzex:NonClientControlProperties.ClickStrategy="MouseEvent" |
210 | 208 | controlzex:NonClientControlProperties.HitTestResult="CLOSE" |
| 209 | + AutomationProperties.AutomationId="Close" |
| 210 | + AutomationProperties.Name="Close" |
211 | 211 | Command="{x:Static SystemCommands.CloseWindowCommand}" |
212 | 212 | Focusable="False" |
213 | 213 | IsEnabled="{Binding RelativeSource={RelativeSource AncestorType={x:Type mah:MetroWindow}}, Path=IsCloseButtonEnabled, Mode=OneWay}" |
|
0 commit comments