MainWindow.xaml
  1  <winuiex:WindowEx
  2      x:Class="MeasureToolUI.MainWindow"
  3      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7      xmlns:winuiex="using:WinUIEx"
  8      Title="PowerToys.ScreenRuler"
  9      IsAlwaysOnTop="True"
 10      IsMaximizable="False"
 11      IsMinimizable="False"
 12      IsResizable="False"
 13      IsTitleBarVisible="False"
 14      mc:Ignorable="d">
 15      <winuiex:WindowEx.Backdrop>
 16          <winuiex:AcrylicSystemBackdrop
 17              DarkFallbackColor="#1c1c1c"
 18              DarkLuminosityOpacity="0.96"
 19              DarkTintColor="#202020"
 20              DarkTintOpacity="0.5"
 21              LightFallbackColor="#EEEEEE"
 22              LightLuminosityOpacity="0.90"
 23              LightTintColor="#F3F3F3"
 24              LightTintOpacity="0" />
 25      </winuiex:WindowEx.Backdrop>
 26  
 27      <Grid>
 28          <Grid.Resources>
 29              <SolidColorBrush x:Key="ToggleButtonBackground" Color="Transparent" />
 30              <SolidColorBrush x:Key="ButtonBackground" Color="Transparent" />
 31              <StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="ControlSolidFillColorDefaultBrush" />
 32  
 33              <Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button">
 34                  <Setter Property="Width" Value="32" />
 35                  <Setter Property="Height" Value="32" />
 36                  <Setter Property="BorderThickness" Value="0" />
 37                  <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
 38                  <Setter Property="FontSize" Value="12" />
 39                  <Setter Property="Padding" Value="0" />
 40              </Style>
 41              <Style x:Key="ToggleButtonRadioButtonStyle" TargetType="ToggleButton">
 42                  <Setter Property="Width" Value="32" />
 43                  <Setter Property="Height" Value="32" />
 44                  <Setter Property="BorderThickness" Value="0" />
 45                  <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
 46                  <Setter Property="FontSize" Value="16" />
 47                  <Setter Property="Padding" Value="0" />
 48                  <Setter Property="Background" Value="{ThemeResource ToggleButtonBackground}" />
 49                  <Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
 50                  <Setter Property="Foreground" Value="{ThemeResource ToggleButtonForeground}" />
 51                  <Setter Property="HorizontalContentAlignment" Value="Center" />
 52                  <Setter Property="VerticalContentAlignment" Value="Center" />
 53                  <Setter Property="HorizontalAlignment" Value="Center" />
 54                  <Setter Property="VerticalAlignment" Value="Center" />
 55                  <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
 56                  <Setter Property="FocusVisualMargin" Value="-3" />
 57                  <Setter Property="CornerRadius" Value="{StaticResource ControlCornerRadius}" />
 58                  <Setter Property="Template">
 59                      <Setter.Value>
 60                          <ControlTemplate TargetType="ToggleButton">
 61                              <ContentPresenter
 62                                  x:Name="ContentPresenter"
 63                                  Padding="{TemplateBinding Padding}"
 64                                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
 65                                  VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
 66                                  AutomationProperties.AccessibilityView="Raw"
 67                                  Background="{TemplateBinding Background}"
 68                                  BackgroundSizing="{TemplateBinding BackgroundSizing}"
 69                                  BorderBrush="{TemplateBinding BorderBrush}"
 70                                  BorderThickness="{TemplateBinding BorderThickness}"
 71                                  Content="{TemplateBinding Content}"
 72                                  ContentTemplate="{TemplateBinding ContentTemplate}"
 73                                  ContentTransitions="{TemplateBinding ContentTransitions}"
 74                                  CornerRadius="{TemplateBinding CornerRadius}">
 75                                  <ContentPresenter.BackgroundTransition>
 76                                      <BrushTransition Duration="0:0:0.083" />
 77                                  </ContentPresenter.BackgroundTransition>
 78  
 79                                  <VisualStateManager.VisualStateGroups>
 80                                      <VisualStateGroup x:Name="CommonStates">
 81                                          <VisualState x:Name="Normal" />
 82  
 83                                          <VisualState x:Name="PointerOver">
 84                                              <Storyboard>
 85                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
 86                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ControlSolidFillColorDefaultBrush}" />
 87                                                  </ObjectAnimationUsingKeyFrames>
 88                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
 89                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushPointerOver}" />
 90                                                  </ObjectAnimationUsingKeyFrames>
 91                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
 92                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundPointerOver}" />
 93                                                  </ObjectAnimationUsingKeyFrames>
 94                                              </Storyboard>
 95                                          </VisualState>
 96                                          <VisualState x:Name="Pressed">
 97                                              <Storyboard>
 98                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
 99                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundPressed}" />
100                                                  </ObjectAnimationUsingKeyFrames>
101                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
102                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushPressed}" />
103                                                  </ObjectAnimationUsingKeyFrames>
104                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
105                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundPressed}" />
106                                                  </ObjectAnimationUsingKeyFrames>
107                                              </Storyboard>
108                                          </VisualState>
109                                          <VisualState x:Name="Disabled">
110                                              <Storyboard>
111                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
112                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundDisabled}" />
113                                                  </ObjectAnimationUsingKeyFrames>
114                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
115                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundDisabled}" />
116                                                  </ObjectAnimationUsingKeyFrames>
117                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
118                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushDisabled}" />
119                                                  </ObjectAnimationUsingKeyFrames>
120                                              </Storyboard>
121                                          </VisualState>
122                                          <VisualState x:Name="Checked">
123                                              <Storyboard>
124                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
125                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundChecked}" />
126                                                  </ObjectAnimationUsingKeyFrames>
127                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
128                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundChecked}" />
129                                                  </ObjectAnimationUsingKeyFrames>
130                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
131                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushChecked}" />
132                                                  </ObjectAnimationUsingKeyFrames>
133                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BackgroundSizing">
134                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}" />
135                                                  </ObjectAnimationUsingKeyFrames>
136                                              </Storyboard>
137                                          </VisualState>
138                                          <VisualState x:Name="CheckedPointerOver">
139                                              <Storyboard>
140                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
141                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundCheckedPointerOver}" />
142                                                  </ObjectAnimationUsingKeyFrames>
143                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
144                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushCheckedPointerOver}" />
145                                                  </ObjectAnimationUsingKeyFrames>
146                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
147                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundCheckedPointerOver}" />
148                                                  </ObjectAnimationUsingKeyFrames>
149                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BackgroundSizing">
150                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}" />
151                                                  </ObjectAnimationUsingKeyFrames>
152                                              </Storyboard>
153                                          </VisualState>
154                                          <VisualState x:Name="CheckedPressed">
155                                              <Storyboard>
156                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
157                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundCheckedPressed}" />
158                                                  </ObjectAnimationUsingKeyFrames>
159                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
160                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundCheckedPressed}" />
161                                                  </ObjectAnimationUsingKeyFrames>
162                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
163                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushCheckedPressed}" />
164                                                  </ObjectAnimationUsingKeyFrames>
165                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BackgroundSizing">
166                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}" />
167                                                  </ObjectAnimationUsingKeyFrames>
168                                              </Storyboard>
169                                          </VisualState>
170                                          <VisualState x:Name="CheckedDisabled">
171                                              <Storyboard>
172                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
173                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundCheckedDisabled}" />
174                                                  </ObjectAnimationUsingKeyFrames>
175                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
176                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundCheckedDisabled}" />
177                                                  </ObjectAnimationUsingKeyFrames>
178                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
179                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushCheckedDisabled}" />
180                                                  </ObjectAnimationUsingKeyFrames>
181                                              </Storyboard>
182                                          </VisualState>
183                                          <VisualState x:Name="Indeterminate">
184                                              <Storyboard>
185                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
186                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundIndeterminate}" />
187                                                  </ObjectAnimationUsingKeyFrames>
188                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
189                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundIndeterminate}" />
190                                                  </ObjectAnimationUsingKeyFrames>
191                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
192                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushIndeterminate}" />
193                                                  </ObjectAnimationUsingKeyFrames>
194                                              </Storyboard>
195                                          </VisualState>
196                                          <VisualState x:Name="IndeterminatePointerOver">
197                                              <Storyboard>
198                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
199                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundIndeterminatePointerOver}" />
200                                                  </ObjectAnimationUsingKeyFrames>
201                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
202                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushIndeterminatePointerOver}" />
203                                                  </ObjectAnimationUsingKeyFrames>
204                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
205                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundIndeterminatePointerOver}" />
206                                                  </ObjectAnimationUsingKeyFrames>
207                                              </Storyboard>
208                                          </VisualState>
209                                          <VisualState x:Name="IndeterminatePressed">
210                                              <Storyboard>
211                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
212                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundIndeterminatePressed}" />
213                                                  </ObjectAnimationUsingKeyFrames>
214                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
215                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushIndeterminatePressed}" />
216                                                  </ObjectAnimationUsingKeyFrames>
217                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
218                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundIndeterminatePressed}" />
219                                                  </ObjectAnimationUsingKeyFrames>
220                                              </Storyboard>
221                                          </VisualState>
222                                          <VisualState x:Name="IndeterminateDisabled">
223                                              <Storyboard>
224                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
225                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundIndeterminateDisabled}" />
226                                                  </ObjectAnimationUsingKeyFrames>
227                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
228                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundIndeterminateDisabled}" />
229                                                  </ObjectAnimationUsingKeyFrames>
230                                                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
231                                                      <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushIndeterminateDisabled}" />
232                                                  </ObjectAnimationUsingKeyFrames>
233                                              </Storyboard>
234                                          </VisualState>
235                                      </VisualStateGroup>
236                                  </VisualStateManager.VisualStateGroups>
237                              </ContentPresenter>
238                          </ControlTemplate>
239                      </Setter.Value>
240                  </Setter>
241              </Style>
242  
243          </Grid.Resources>
244  
245          <StackPanel
246              HorizontalAlignment="Center"
247              Loaded="StackPanel_Loaded"
248              Orientation="Horizontal"
249              Spacing="8">
250              <ToggleButton
251                  Name="btnBounds"
252                  x:Uid="BtnBounds"
253                  AutomationProperties.AutomationId="Button_Bounds"
254                  Click="BoundsTool_Click"
255                  Content="&#xEF20;"
256                  KeyboardAcceleratorPlacementMode="Auto"
257                  Style="{StaticResource ToggleButtonRadioButtonStyle}">
258                  <ToolTipService.ToolTip>
259                      <TextBlock x:Uid="BtnBoundsTooltip" />
260                  </ToolTipService.ToolTip>
261                  <ToggleButton.KeyboardAccelerators>
262                      <KeyboardAccelerator
263                          Key="Number1"
264                          Invoked="KeyboardAccelerator_Invoked"
265                          Modifiers="Control" />
266                  </ToggleButton.KeyboardAccelerators>
267              </ToggleButton>
268              <ToggleButton
269                  Name="btnSpacing"
270                  x:Uid="BtnSpacing"
271                  AutomationProperties.AutomationId="Button_Spacing"
272                  Click="MeasureTool_Click"
273                  Style="{StaticResource ToggleButtonRadioButtonStyle}">
274                  <ToolTipService.ToolTip>
275                      <TextBlock x:Uid="BtnSpacingTooltip" />
276                  </ToolTipService.ToolTip>
277                  <PathIcon Data="M12 16.5C12 16.2239 11.7761 16 11.5 16L9 16V9H16V11.5C16 11.7761 16.2239 12 16.5 12C16.7761 12 17 11.7761 17 11.5V8.5V5.5C17 5.22386 16.7761 5 16.5 5C16.2239 5 16 5.22386 16 5.5V8H9V1L11.5 1C11.7761 1 12 0.776142 12 0.5C12 0.223858 11.7761 0 11.5 0H8.5014H8.5H8.4986H5.5C5.22386 0 5 0.223858 5 0.5C5 0.776142 5.22386 1 5.5 1H8L8 8H1L1 5.5C1 5.22386 0.776142 5 0.5 5C0.223858 5 0 5.22386 0 5.5V8.5V11.5C0 11.7761 0.223858 12 0.500001 12C0.776143 12 1 11.7761 1 11.5L1 9H8L8 16H5.5C5.22386 16 5 16.2239 5 16.5C5 16.7761 5.22386 17 5.5 17H8.5H11.5C11.7761 17 12 16.7761 12 16.5Z" />
278                  <ToggleButton.KeyboardAccelerators>
279                      <KeyboardAccelerator
280                          Key="Number2"
281                          Invoked="KeyboardAccelerator_Invoked"
282                          Modifiers="Control" />
283                  </ToggleButton.KeyboardAccelerators>
284              </ToggleButton>
285  
286              <ToggleButton
287                  Name="btnHorizontalSpacing"
288                  x:Uid="BtnHorizontalSpacing"
289                  AutomationProperties.AutomationId="Button_SpacingHorizontal"
290                  Click="HorizontalMeasureTool_Click"
291                  Style="{StaticResource ToggleButtonRadioButtonStyle}">
292                  <ToolTipService.ToolTip>
293                      <TextBlock x:Uid="BtnHorizontalSpacingTooltip" />
294                  </ToolTipService.ToolTip>
295                  <PathIcon Data="M1 10.5C1 10.7761 0.776143 11 0.500001 11C0.223858 11 0 10.7761 0 10.5V7.5V4.5C0 4.22386 0.223858 4 0.5 4C0.776142 4 1 4.22386 1 4.5L1 7L15 7V4.5C15 4.22386 15.2239 4 15.5 4C15.7761 4 16 4.22386 16 4.5V7.4993C16 7.49953 16 7.49977 16 7.5C16 7.50023 16 7.50047 16 7.5007V10.5C16 10.7761 15.7761 11 15.5 11C15.2239 11 15 10.7761 15 10.5V8L1 8L1 10.5Z">
296                      <PathIcon.RenderTransform>
297                          <TranslateTransform Y="-2" />
298                      </PathIcon.RenderTransform>
299                  </PathIcon>
300                  <ToggleButton.KeyboardAccelerators>
301                      <KeyboardAccelerator
302                          Key="Number3"
303                          Invoked="KeyboardAccelerator_Invoked"
304                          Modifiers="Control" />
305                  </ToggleButton.KeyboardAccelerators>
306              </ToggleButton>
307              <ToggleButton
308                  Name="btnVerticalSpacing"
309                  x:Uid="BtnVerticalSpacing"
310                  AutomationProperties.AutomationId="Button_SpacingVertical"
311                  Click="VerticalMeasureTool_Click"
312                  Style="{StaticResource ToggleButtonRadioButtonStyle}">
313                  <ToolTipService.ToolTip>
314                      <TextBlock x:Uid="BtnVerticalSpacingTooltip" />
315                  </ToolTipService.ToolTip>
316                  <PathIcon Data="M10.5 0C10.7761 0 11 0.223858 11 0.5C11 0.776142 10.7761 1 10.5 1L8 1V15H10.5C10.7761 15 11 15.2239 11 15.5C11 15.7761 10.7761 16 10.5 16H7.5H4.5C4.22386 16 4 15.7761 4 15.5C4 15.2239 4.22386 15 4.5 15H7V1L4.5 1C4.22386 1 4 0.776143 4 0.500001C4 0.223858 4.22386 0 4.5 0H7.5H10.5Z">
317                      <PathIcon.RenderTransform>
318                          <TranslateTransform X="-3" />
319                      </PathIcon.RenderTransform>
320                  </PathIcon>
321                  <ToggleButton.KeyboardAccelerators>
322                      <KeyboardAccelerator
323                          Key="Number4"
324                          Invoked="KeyboardAccelerator_Invoked"
325                          Modifiers="Control" />
326                  </ToggleButton.KeyboardAccelerators>
327              </ToggleButton>
328              <AppBarSeparator />
329              <Button
330                  x:Uid="BtnClosePanel"
331                  AutomationProperties.AutomationId="Button_Close"
332                  Click="ClosePanelTool_Click"
333                  Content="&#xE8BB;"
334                  Foreground="{StaticResource CloseButtonBackgroundPointerOver}">
335                  <ToolTipService.ToolTip>
336                      <TextBlock x:Uid="BtnClosePanelTooltip" />
337                  </ToolTipService.ToolTip>
338                  <Button.KeyboardAccelerators>
339                      <KeyboardAccelerator Key="Escape" Invoked="KeyboardAccelerator_Invoked" />
340                  </Button.KeyboardAccelerators>
341              </Button>
342          </StackPanel>
343      </Grid>
344  </winuiex:WindowEx>