<commit_before><local:WindowChromeWindow x:Class="ControlzEx.Showcase.MainWindow"
                          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                          xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
                          xmlns:controlzEx="urn:controlzex"
                          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                          xmlns:local="clr-namespace:ControlzEx.Showcase"
                          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                          xmlns:system="clr-namespace:System;assembly=mscorlib"
                          xmlns:views="clr-namespace:ControlzEx.Showcase.Views"
                          xmlns:native="clr-namespace:ControlzEx.Standard;assembly=ControlzEx"
                          x:Name="Window"
                          Title="ControlzEx.Showcase"
                          Width="800"
                          Height="600"
                          MinWidth="80"
                          MinHeight="60"
                          Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                          FlowDirection="LeftToRight"
                          GlowColor="Navy"
                          NonActiveGlowColor="Crimson"
                          Style="{StaticResource {x:Type local:WindowChromeWindow}}"
                          WindowStartupLocation="CenterScreen"
                          WindowState="Normal"
                          mc:Ignorable="d">
    <local:WindowChromeWindow.Resources>
        <ObjectDataProvider x:Key="ResizeModeEnumValues"
                            MethodName="GetValues"
                            ObjectType="{x:Type ResizeMode}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="ResizeMode" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>

        <ObjectDataProvider x:Key="WindowStyleEnumValues"
                            MethodName="GetValues"
                            ObjectType="{x:Type WindowStyle}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="WindowStyle" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>

        <ObjectDataProvider x:Key="CornerPreferenceEnumValues"
                            MethodName="GetValues"
                            ObjectType="{x:Type native:DWM_WINDOW_CORNER_PREFERENCE}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="native:DWM_WINDOW_CORNER_PREFERENCE" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </local:WindowChromeWindow.Resources>

    <Grid SnapsToDevicePixels="True">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0"
                  controlzEx:WindowChrome.IsHitTestVisibleInChrome="False"
                  controlzEx:NonClientControlProperties.HitTestResult="CAPTION"
                  MouseLeftButtonDown="TitleBarGrid_OnMouseLeftButtonDown"
                  MouseRightButtonUp="TitleBarGrid_OnMouseRightButtonUp">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border Grid.ColumnSpan="10" Background="{Binding ElementName=Window, Path=NCCurrentBrush}" />
                
                <ProgressBar Grid.Column="0" Width="20" IsIndeterminate="True" />

                <!-- <ProgressBar IsIndeterminate="True" /> -->

                <TextBlock x:Name="TitlebarText"
                           Grid.Column="1"
                           Margin="4 0 0 0"
                           HorizontalAlignment="Center"
                           Text="Use GridSplitter below to move content above titlebar" />

                <UniformGrid Grid.Column="2" Columns="3">
                    <Button Style="{StaticResource WindowTitleBarButton}"
                            IsEnabled="{Binding IsEnabled, ElementName=MinimizeButton}"
                            Width="20"
                            Content="_"
                            Click="MinimizeButton_Click"
                            controlzEx:NonClientControlProperties.HitTestResult="MINBUTTON"
                            controlzEx:NonClientControlProperties.ClickStrategy="AutomationPeer" />
                    <Button Style="{StaticResource WindowTitleBarButton}"
                            IsEnabled="{Binding IsEnabled, ElementName=MaximizeButton}"
                            Content="[ ]"
                            Click="RestoreOrMaximizeButton_Click"
                            controlzEx:NonClientControlProperties.HitTestResult="MAXBUTTON"
                            controlzEx:NonClientControlProperties.ClickStrategy="MouseEvent" />
                    <Button Style="{StaticResource WindowTitleBarButton}"
                            Content="X"
                            Click="CloseButton_Click"
                            controlzEx:NonClientControlProperties.HitTestResult="CLOSE"
                            controlzEx:NonClientControlProperties.ClickStrategy="MouseEvent" />
                </UniformGrid>
            </Grid>

            <GridSplitter Grid.Row="1"
                          Height="8"
                          HorizontalAlignment="Stretch"
                          controlzEx:WindowChrome.IsHitTestVisibleInChrome="False"
                          controlzEx:NonClientControlProperties.HitTestResult="CLIENT"
                          Background="{DynamicResource ControlzEx.Brushes.AccentBaseColorBrush}" />

            <controlzEx:TabControlEx Grid.Row="2">
                <TabItem Header="WindowChrome">
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <Grid Grid.IsSharedSizeScope="True">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>

                            <GroupBox Grid.Row="0"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Actions">
                                <WrapPanel Orientation="Horizontal">
                                    <Button x:Name="MinimizeButton"
                                            MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Click="ButtonMinimizeOnClick"
                                            Content="Minimize">
                                        <Button.Style>
                                            <Style BasedOn="{StaticResource {x:Type Button}}"
                                                   TargetType="{x:Type Button}">
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding ElementName=Window, Path=ResizeMode}"
                                                                 Value="{x:Static ResizeMode.NoResize}">
                                                        <Setter Property="IsEnabled" Value="False" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Button.Style>
                                    </Button>
                                    <Button x:Name="MaximizeButton" 
                                            MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Click="ButtonMaximizeOnClick"
                                            Content="Maximize">
                                        <Button.Style>
                                            <Style BasedOn="{StaticResource {x:Type Button}}"
                                                   TargetType="{x:Type Button}">
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding ElementName=Window, Path=ResizeMode}"
                                                                 Value="{x:Static ResizeMode.NoResize}">
                                                        <Setter Property="IsEnabled" Value="False" />
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding ElementName=Window, Path=ResizeMode}"
                                                                 Value="{x:Static ResizeMode.CanMinimize}">
                                                        <Setter Property="IsEnabled" Value="False" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Button.Style>
                                    </Button>
                                    <Button MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Click="ButtonRestoreOnClick"
                                            Content="Restore">
                                        <Button.Style>
                                            <Style BasedOn="{StaticResource {x:Type Button}}"
                                                   TargetType="{x:Type Button}">
                                                <Setter Property="IsEnabled" Value="False" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding ElementName=Window, Path=WindowState}"
                                                                 Value="{x:Static WindowState.Maximized}">
                                                        <Setter Property="IsEnabled" Value="True" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Button.Style>
                                    </Button>

                                    <Button MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Click="ButtonHideOnClick"
                                            Content="Hide" />
                                </WrapPanel>
                            </GroupBox>

                            <GroupBox Grid.Row="1"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Window tests (primarily for glows)">
                                <StackPanel Orientation="Vertical">
                                    <WrapPanel Orientation="Horizontal">
                                        <CheckBox x:Name="SetOwner"
                                                  Margin="4"
                                                  Content="Set owner"
                                                  IsChecked="True" />
                                    </WrapPanel>

                                    <WrapPanel Orientation="Horizontal">
                                        <Button MinWidth="100"
                                                Margin="4"
                                                Padding="4"
                                                Click="ButtonOpenChildWindowOnClick"
                                                Content="Open child window" />

                                        <Button MinWidth="100"
                                                Margin="4"
                                                Padding="4"
                                                Click="ButtonOpenModalChildWindowOnClick"
                                                Content="Open modal child window" />

                                        <Button MinWidth="100"
                                                Margin="4"
                                                Padding="4"
                                                Click="ButtonOpenPseudoModalChildWindowOnClick"
                                                Content="Open pseudo modal child window" />
                                    </WrapPanel>
                                </StackPanel>
                            </GroupBox>

                            <GroupBox Grid.Row="2"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Misc">
                                <WrapPanel Orientation="Horizontal">
                                    <Button MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Content="ToolTipAssist">
                                        <Button.ToolTip>
                                            <ToolTip controlzEx:ToolTipAssist.AutoMove="True">
                                                <ToolTip.Template>
                                                    <ControlTemplate>
                                                        <Grid>
                                                            <Border Background="Gray"
                                                                    BorderBrush="Black"
                                                                    BorderThickness="1"
                                                                    Opacity="0.9"
                                                                    SnapsToDevicePixels="True" />
                                                            <StackPanel Orientation="Vertical">
                                                                <TextBlock Margin="5"
                                                                           FontSize="22"
                                                                           Foreground="WhiteSmoke"
                                                                           Text="ToolTipHelper AutoMove sample"
                                                                           TextOptions.TextFormattingMode="Display"
                                                                           TextOptions.TextRenderingMode="ClearType" />
                                                                <Viewbox Width="64" Height="64">
                                                                    <Canvas Width="24" Height="24">
                                                                        <Path
                                                                            Data="M19,10C19,11.38 16.88,12.5 15.5,12.5C14.12,12.5 12.75,11.38 12.75,10H11.25C11.25,11.38 9.88,12.5 8.5,12.5C7.12,12.5 5,11.38 5,10H4.25C4.09,10.64 4,11.31 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,11.31 19.91,10.64 19.75,10H19M12,4C9.04,4 6.45,5.61 5.07,8H18.93C17.55,5.61 14.96,4 12,4M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M12,17.23C10.25,17.23 8.71,16.5 7.81,15.42L9.23,14C9.68,14.72 10.75,15.23 12,15.23C13.25,15.23 14.32,14.72 14.77,14L16.19,15.42C15.29,16.5 13.75,17.23 12,17.23Z"
                                                                            Fill="DarkOrange" />
                                                                    </Canvas>
                                                                </Viewbox>
                                                            </StackPanel>
                                                        </Grid>
                                                    </ControlTemplate>
                                                </ToolTip.Template>
                                            </ToolTip>
                                        </Button.ToolTip>
                                    </Button>
                                    <controlzEx:BadgedEx x:Name="BadgedButton"
                                                         Badge="{x:Static system:DateTime.Now}"
                                                         BadgeBackground="DodgerBlue"
                                                         BadgeForeground="White"
                                                         BadgeStringFormat="{}{0:ss}">
                                        <Button MinWidth="100"
                                                Margin="4"
                                                Padding="4"
                                                Click="BadgedButtonOnClick"
                                                Content="Badge" />
                                    </controlzEx:BadgedEx>
                                </WrapPanel>
                            </GroupBox>

                            <GroupBox Grid.Row="3"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Options">
                                <local:UniformGridEx Columns="2"
                                                     ShowGridLines="True">
                                    <Label>
                                        Style
                                    </Label>
                                    <ComboBox x:Name="StyleComboBox"
                                              Margin="4"
                                              VerticalAlignment="Center"
                                              ItemsSource="{Binding Source={StaticResource WindowStyleEnumValues}}"
                                              SelectedItem="{Binding ElementName=Window, Path=WindowStyle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                    <Label>
                                        ResizeMode
                                    </Label>
                                    <ComboBox x:Name="ResizeModeComboBox"
                                              Margin="4"
                                              VerticalAlignment="Center"
                                              ItemsSource="{Binding Source={StaticResource ResizeModeEnumValues}}"
                                              SelectedItem="{Binding ElementName=Window, Path=ResizeMode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        GlowColor
                                    </Label>
                                    <ComboBox Margin="4"
                                              VerticalAlignment="Center"
                                              HorizontalContentAlignment="Stretch"
                                              ItemsSource="{Binding Colors, ElementName=Window}"
                                              SelectedValue="{Binding ElementName=Window, Path=GlowColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              SelectedValuePath="Value">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Grid.Column="0"
                                                               Margin="4 0"
                                                               Text="{Binding}" />
                                                    <Grid Grid.Column="1"
                                                          Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
                                                          Margin="4 0"
                                                          VerticalAlignment="Stretch">
                                                        <Grid.Background>
                                                            <SolidColorBrush Color="{Binding Value}" />
                                                        </Grid.Background>
                                                    </Grid>
                                                </Grid>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>

                                    <Label>
                                        NonActiveGlowColor
                                    </Label>
                                    <ComboBox Margin="4"
                                              VerticalAlignment="Center"
                                              HorizontalContentAlignment="Stretch"
                                              ItemsSource="{Binding Colors, ElementName=Window}"
                                              SelectedValue="{Binding ElementName=Window, Path=NonActiveGlowColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              SelectedValuePath="Value">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Grid.Column="0"
                                                               Margin="4 0"
                                                               Text="{Binding}" />
                                                    <Grid Grid.Column="1"
                                                          Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
                                                          Margin="4 0"
                                                          VerticalAlignment="Stretch">
                                                        <Grid.Background>
                                                            <SolidColorBrush Color="{Binding Value}" />
                                                        </Grid.Background>
                                                    </Grid>
                                                </Grid>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>

                                    <Label>
                                        Background
                                    </Label>
                                    <ComboBox Margin="4"
                                              VerticalAlignment="Center"
                                              HorizontalContentAlignment="Stretch"
                                              ItemsSource="{Binding Brushes, ElementName=Window}"
                                              SelectedValue="{Binding ElementName=Window, Path=Background, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              SelectedValuePath="Value">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Grid.Column="0"
                                                               Margin="4 0"
                                                               Text="{Binding}" />
                                                    <Grid Grid.Column="1"
                                                          Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
                                                          Margin="4 0"
                                                          VerticalAlignment="Stretch"
                                                          Background="{Binding Value}" />
                                                </Grid>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>

                                    <Label>
                                        BorderBrush
                                    </Label>
                                    <ComboBox Margin="4"
                                              VerticalAlignment="Center"
                                              HorizontalContentAlignment="Stretch"
                                              ItemsSource="{Binding Brushes, ElementName=Window}"
                                              SelectedValue="{Binding ElementName=Window, Path=BorderBrush, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              SelectedValuePath="Value">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Grid.Column="0"
                                                               Margin="4 0"
                                                               Text="{Binding}" />
                                                    <Grid Grid.Column="1"
                                                          Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
                                                          Margin="4 0"
                                                          VerticalAlignment="Stretch"
                                                          Background="{Binding Value}" />
                                                </Grid>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>

                                    <Label>
                                        ShowInTaskbar
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=ShowInTaskbar, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                    
                                    <Label>
                                        IgnoreTaskbarOnMaximize
                                    </Label>
                                    <CheckBox
                                        Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=IgnoreTaskbarOnMaximize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        KeepBorderOnMaximize
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=KeepBorderOnMaximize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        TryToBeFlickerFree
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=TryToBeFlickerFree, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        CornerPreference
                                    </Label>
                                    <ComboBox x:Name="CornerPreferenceComboBox"
                                              Margin="4"
                                              VerticalAlignment="Center"
                                              ItemsSource="{Binding Source={StaticResource CornerPreferenceEnumValues}}"
                                              SelectedItem="{Binding ElementName=Window, Path=CornerPreference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                    
                                    <Label>
                                        Topmost
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=Topmost, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        ShowInTaskbar
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=ShowInTaskbar, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        IsActive
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=IsActive, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                              IsEnabled="False" />

                                    <Label>
                                        IsNCActive
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=IsNCActive, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                              IsEnabled="False" />

                                    <Label>
                                        EnableMinimize (Enable/Disable System Menu Item)
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=ShowMinButton, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        EnableMaxRestore (Enable/Disable System Menu Item)
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=ShowMaxRestoreButton, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                </local:UniformGridEx>
                            </GroupBox>

                            <GroupBox Grid.Row="4"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Current values">
                                <local:UniformGridEx Columns="2"
                                                     ShowGridLines="True">
                                    <Label>
                                        Position
                                    </Label>
                                    <StackPanel Margin="4"
                                                VerticalAlignment="Center"
                                                Orientation="Horizontal">
                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 IsReadOnly="True"
                                                 Text="{Binding ElementName=Window, Path=Left, Mode=OneWay}" />

                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 IsReadOnly="True"
                                                 Text="{Binding ElementName=Window, Path=Top, Mode=OneWay}" />
                                    </StackPanel>

                                    <Label>
                                        Size
                                    </Label>
                                    <StackPanel Margin="4"
                                                VerticalAlignment="Center"
                                                Orientation="Horizontal">
                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 IsReadOnly="True"
                                                 Text="{Binding ElementName=Window, Path=ActualWidth, Mode=OneWay}" />

                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 IsReadOnly="True"
                                                 Text="{Binding ElementName=Window, Path=ActualHeight, Mode=OneWay}" />
                                    </StackPanel>

                                    <Label>
                                        MinSize
                                    </Label>
                                    <StackPanel Margin="4"
                                                VerticalAlignment="Center"
                                                Orientation="Horizontal">
                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=MinWidth, Mode=TwoWay}" />

                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=MinHeight, Mode=TwoWay}" />

                                        <Button Padding="4"
                                                Click="ButtonResetMinSizesOnClick"
                                                Content="Reset" />
                                    </StackPanel>

                                    <Label>
                                        MaxSize
                                    </Label>
                                    <StackPanel Margin="4"
                                                VerticalAlignment="Center"
                                                Orientation="Horizontal">
                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=MaxWidth, Mode=TwoWay}" />

                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=MaxHeight, Mode=TwoWay}" />

                                        <Button Padding="4"
                                                Click="ButtonResetMaxSizesOnClick"
                                                Content="Reset" />
                                    </StackPanel>

                                    <Label>
                                        BorderThickness
                                    </Label>
                                    <TextBox Margin="4"
                                             Padding="2"
                                             VerticalAlignment="Center"
                                             Text="{Binding ElementName=Window, Path=BorderThickness, Mode=TwoWay}" />
                                    
                                    <Label>
                                        ResizeBorderThickness
                                    </Label>
                                    <TextBox Margin="4"
                                             Padding="2"
                                             VerticalAlignment="Center"
                                             Text="{Binding ElementName=Window, Path=ResizeBorderThickness, Mode=TwoWay}" />

                                    <Label>
                                        GlowDepth
                                    </Label>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Margin="4"
                                                 Padding="2"
                                                 Width="30"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=GlowDepth, Mode=TwoWay}" />
                                        <CheckBox x:Name="AnimateGlowDepth" 
                                                  Margin="4"
                                                  Padding="2"
                                                  VerticalAlignment="Center"
                                                  VerticalContentAlignment="Center"
                                                  Checked="AnimateGlowDepth_OnChecked"
                                                  Unchecked="AnimateGlowDepth_OnUnchecked">Animate</CheckBox>
                                    </StackPanel>

                                    <Label>
                                        PreferDWMBorderColor
                                    </Label>
                                    <CheckBox Margin="4"
                                              Padding="2"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=PreferDWMBorderColor, Mode=TwoWay}" />

                                    <Label>
                                        DWMSupportsBorderColor
                                    </Label>
                                    <CheckBox Margin="4"
                                              Padding="2"
                                              VerticalAlignment="Center"
                                              IsEnabled="False"
                                              IsChecked="{Binding ElementName=Window, Path=DWMSupportsBorderColor, Mode=OneWay}" />

                                    <Label>
                                        UseRadialGradientForCorners
                                    </Label>
                                    <CheckBox Margin="4"
                                              Padding="2"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=UseRadialGradientForCorners, Mode=TwoWay}" />
                                </local:UniformGridEx>
                            </GroupBox>
                        </Grid>
                    </ScrollViewer>
                </TabItem>

                <TabItem Header="TabControlEx">
                    <StackPanel>
                        <TextBox Margin="5"
                                 HorizontalAlignment="Center"
                                 Text="Lorem ipsum dolor sit amet, consetetur sadipscing" /><commit_msg>Improving showcase<commit_after><local:WindowChromeWindow x:Class="ControlzEx.Showcase.MainWindow"
                          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                          xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
                          xmlns:controlzEx="urn:controlzex"
                          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                          xmlns:local="clr-namespace:ControlzEx.Showcase"
                          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                          xmlns:system="clr-namespace:System;assembly=mscorlib"
                          xmlns:views="clr-namespace:ControlzEx.Showcase.Views"
                          xmlns:native="clr-namespace:ControlzEx.Standard;assembly=ControlzEx"
                          x:Name="Window"
                          Title="ControlzEx.Showcase"
                          Width="800"
                          Height="600"
                          MinWidth="80"
                          MinHeight="60"
                          Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                          FlowDirection="LeftToRight"
                          GlowColor="Navy"
                          NonActiveGlowColor="Crimson"
                          Style="{StaticResource {x:Type local:WindowChromeWindow}}"
                          WindowStartupLocation="CenterScreen"
                          WindowState="Normal"
                          mc:Ignorable="d">
    <local:WindowChromeWindow.Resources>
        <ObjectDataProvider x:Key="ResizeModeEnumValues"
                            MethodName="GetValues"
                            ObjectType="{x:Type ResizeMode}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="ResizeMode" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>

        <ObjectDataProvider x:Key="WindowStyleEnumValues"
                            MethodName="GetValues"
                            ObjectType="{x:Type WindowStyle}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="WindowStyle" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>

        <ObjectDataProvider x:Key="CornerPreferenceEnumValues"
                            MethodName="GetValues"
                            ObjectType="{x:Type native:DWM_WINDOW_CORNER_PREFERENCE}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="native:DWM_WINDOW_CORNER_PREFERENCE" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </local:WindowChromeWindow.Resources>

    <Grid SnapsToDevicePixels="True">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0"
                  controlzEx:WindowChrome.IsHitTestVisibleInChrome="False"
                  controlzEx:NonClientControlProperties.HitTestResult="CAPTION"
                  MouseLeftButtonDown="TitleBarGrid_OnMouseLeftButtonDown"
                  MouseRightButtonUp="TitleBarGrid_OnMouseRightButtonUp">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border Grid.ColumnSpan="10" Background="{Binding ElementName=Window, Path=NCCurrentBrush}" />
                
                <ProgressBar Grid.Column="0" Width="20" IsIndeterminate="True" />

                <!-- <ProgressBar IsIndeterminate="True" /> -->

                <TextBlock x:Name="TitlebarText"
                           Grid.Column="1"
                           Margin="4 0 0 0"
                           HorizontalAlignment="Center"
                           Text="Use GridSplitter below to move content above titlebar" />

                <UniformGrid Grid.Column="2" Columns="3">
                    <Button Style="{StaticResource WindowTitleBarButton}"
                            IsEnabled="{Binding IsEnabled, ElementName=MinimizeButton}"
                            Width="20"
                            Content="_"
                            Click="MinimizeButton_Click"
                            controlzEx:NonClientControlProperties.HitTestResult="MINBUTTON"
                            controlzEx:NonClientControlProperties.ClickStrategy="AutomationPeer" />
                    <Button Style="{StaticResource WindowTitleBarButton}"
                            IsEnabled="{Binding IsEnabled, ElementName=MaximizeButton}"
                            Content="[ ]"
                            Click="RestoreOrMaximizeButton_Click"
                            controlzEx:NonClientControlProperties.HitTestResult="MAXBUTTON"
                            controlzEx:NonClientControlProperties.ClickStrategy="MouseEvent" />
                    <Button Style="{StaticResource WindowTitleBarButton}"
                            Content="X"
                            Click="CloseButton_Click"
                            controlzEx:NonClientControlProperties.HitTestResult="CLOSE"
                            controlzEx:NonClientControlProperties.ClickStrategy="MouseEvent" />
                </UniformGrid>
            </Grid>

            <GridSplitter Grid.Row="1"
                          Height="8"
                          HorizontalAlignment="Stretch"
                          controlzEx:WindowChrome.IsHitTestVisibleInChrome="False"
                          controlzEx:NonClientControlProperties.HitTestResult="CLIENT"
                          Background="{DynamicResource ControlzEx.Brushes.AccentBaseColorBrush}" />

            <controlzEx:TabControlEx Grid.Row="2">
                <TabItem Header="WindowChrome">
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <Grid Grid.IsSharedSizeScope="True">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>

                            <GroupBox Grid.Row="0"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Actions">
                                <WrapPanel Orientation="Horizontal">
                                    <Button x:Name="MinimizeButton"
                                            MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Click="ButtonMinimizeOnClick"
                                            Content="Minimize">
                                        <Button.Style>
                                            <Style BasedOn="{StaticResource {x:Type Button}}"
                                                   TargetType="{x:Type Button}">
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding ElementName=Window, Path=ResizeMode}"
                                                                 Value="{x:Static ResizeMode.NoResize}">
                                                        <Setter Property="IsEnabled" Value="False" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Button.Style>
                                    </Button>
                                    <Button x:Name="MaximizeButton" 
                                            MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Click="ButtonMaximizeOnClick"
                                            Content="Maximize">
                                        <Button.Style>
                                            <Style BasedOn="{StaticResource {x:Type Button}}"
                                                   TargetType="{x:Type Button}">
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding ElementName=Window, Path=ResizeMode}"
                                                                 Value="{x:Static ResizeMode.NoResize}">
                                                        <Setter Property="IsEnabled" Value="False" />
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding ElementName=Window, Path=ResizeMode}"
                                                                 Value="{x:Static ResizeMode.CanMinimize}">
                                                        <Setter Property="IsEnabled" Value="False" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Button.Style>
                                    </Button>
                                    <Button MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Click="ButtonRestoreOnClick"
                                            Content="Restore">
                                        <Button.Style>
                                            <Style BasedOn="{StaticResource {x:Type Button}}"
                                                   TargetType="{x:Type Button}">
                                                <Setter Property="IsEnabled" Value="False" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding ElementName=Window, Path=WindowState}"
                                                                 Value="{x:Static WindowState.Maximized}">
                                                        <Setter Property="IsEnabled" Value="True" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Button.Style>
                                    </Button>

                                    <Button MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Click="ButtonHideOnClick"
                                            Content="Hide" />
                                </WrapPanel>
                            </GroupBox>

                            <GroupBox Grid.Row="1"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Window tests (primarily for glows)">
                                <StackPanel Orientation="Vertical">
                                    <WrapPanel Orientation="Horizontal">
                                        <CheckBox x:Name="SetOwner"
                                                  Margin="4"
                                                  Content="Set owner"
                                                  IsChecked="True" />
                                    </WrapPanel>

                                    <WrapPanel Orientation="Horizontal">
                                        <Button MinWidth="100"
                                                Margin="4"
                                                Padding="4"
                                                Click="ButtonOpenChildWindowOnClick"
                                                Content="Open child window" />

                                        <Button MinWidth="100"
                                                Margin="4"
                                                Padding="4"
                                                Click="ButtonOpenModalChildWindowOnClick"
                                                Content="Open modal child window" />

                                        <Button MinWidth="100"
                                                Margin="4"
                                                Padding="4"
                                                Click="ButtonOpenPseudoModalChildWindowOnClick"
                                                Content="Open pseudo modal child window" />
                                    </WrapPanel>
                                </StackPanel>
                            </GroupBox>

                            <GroupBox Grid.Row="2"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Misc">
                                <WrapPanel Orientation="Horizontal">
                                    <Button MinWidth="100"
                                            Margin="4"
                                            Padding="4"
                                            Content="ToolTipAssist">
                                        <Button.ToolTip>
                                            <ToolTip controlzEx:ToolTipAssist.AutoMove="True">
                                                <ToolTip.Template>
                                                    <ControlTemplate>
                                                        <Grid>
                                                            <Border Background="Gray"
                                                                    BorderBrush="Black"
                                                                    BorderThickness="1"
                                                                    Opacity="0.9"
                                                                    SnapsToDevicePixels="True" />
                                                            <StackPanel Orientation="Vertical">
                                                                <TextBlock Margin="5"
                                                                           FontSize="22"
                                                                           Foreground="WhiteSmoke"
                                                                           Text="ToolTipHelper AutoMove sample"
                                                                           TextOptions.TextFormattingMode="Display"
                                                                           TextOptions.TextRenderingMode="ClearType" />
                                                                <Viewbox Width="64" Height="64">
                                                                    <Canvas Width="24" Height="24">
                                                                        <Path
                                                                            Data="M19,10C19,11.38 16.88,12.5 15.5,12.5C14.12,12.5 12.75,11.38 12.75,10H11.25C11.25,11.38 9.88,12.5 8.5,12.5C7.12,12.5 5,11.38 5,10H4.25C4.09,10.64 4,11.31 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,11.31 19.91,10.64 19.75,10H19M12,4C9.04,4 6.45,5.61 5.07,8H18.93C17.55,5.61 14.96,4 12,4M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M12,17.23C10.25,17.23 8.71,16.5 7.81,15.42L9.23,14C9.68,14.72 10.75,15.23 12,15.23C13.25,15.23 14.32,14.72 14.77,14L16.19,15.42C15.29,16.5 13.75,17.23 12,17.23Z"
                                                                            Fill="DarkOrange" />
                                                                    </Canvas>
                                                                </Viewbox>
                                                            </StackPanel>
                                                        </Grid>
                                                    </ControlTemplate>
                                                </ToolTip.Template>
                                            </ToolTip>
                                        </Button.ToolTip>
                                    </Button>
                                    <controlzEx:BadgedEx x:Name="BadgedButton"
                                                         Badge="{x:Static system:DateTime.Now}"
                                                         BadgeBackground="DodgerBlue"
                                                         BadgeForeground="White"
                                                         BadgeStringFormat="{}{0:ss}">
                                        <Button MinWidth="100"
                                                Margin="4"
                                                Padding="4"
                                                Click="BadgedButtonOnClick"
                                                Content="Badge" />
                                    </controlzEx:BadgedEx>
                                </WrapPanel>
                            </GroupBox>

                            <GroupBox Grid.Row="3"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Options (Window)">
                                <local:UniformGridEx Columns="2"
                                                     ShowGridLines="True">
                                    <Label>
                                        Style
                                    </Label>
                                    <ComboBox x:Name="StyleComboBox"
                                              Margin="4"
                                              VerticalAlignment="Center"
                                              ItemsSource="{Binding Source={StaticResource WindowStyleEnumValues}}"
                                              SelectedItem="{Binding ElementName=Window, Path=WindowStyle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                    <Label>
                                        ResizeMode
                                    </Label>
                                    <ComboBox x:Name="ResizeModeComboBox"
                                              Margin="4"
                                              VerticalAlignment="Center"
                                              ItemsSource="{Binding Source={StaticResource ResizeModeEnumValues}}"
                                              SelectedItem="{Binding ElementName=Window, Path=ResizeMode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                    
                                    <Label>
                                        Background
                                    </Label>
                                    <ComboBox Margin="4"
                                              VerticalAlignment="Center"
                                              HorizontalContentAlignment="Stretch"
                                              ItemsSource="{Binding Brushes, ElementName=Window}"
                                              SelectedValue="{Binding ElementName=Window, Path=Background, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              SelectedValuePath="Value">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Grid.Column="0"
                                                               Margin="4 0"
                                                               Text="{Binding}" />
                                                    <Grid Grid.Column="1"
                                                          Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
                                                          Margin="4 0"
                                                          VerticalAlignment="Stretch"
                                                          Background="{Binding Value}" />
                                                </Grid>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>

                                    <Label>
                                        BorderThickness
                                    </Label>
                                    <TextBox Margin="4"
                                             Padding="2"
                                             VerticalAlignment="Center"
                                             Text="{Binding ElementName=Window, Path=BorderThickness, Mode=TwoWay}" />

                                    <Label>
                                        BorderBrush
                                    </Label>
                                    <ComboBox Margin="4"
                                              VerticalAlignment="Center"
                                              HorizontalContentAlignment="Stretch"
                                              ItemsSource="{Binding Brushes, ElementName=Window}"
                                              SelectedValue="{Binding ElementName=Window, Path=BorderBrush, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              SelectedValuePath="Value">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Grid.Column="0"
                                                               Margin="4 0"
                                                               Text="{Binding}" />
                                                    <Grid Grid.Column="1"
                                                          Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
                                                          Margin="4 0"
                                                          VerticalAlignment="Stretch"
                                                          Background="{Binding Value}" />
                                                </Grid>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>
                                    
                                    <Label>
                                        ShowInTaskbar
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=ShowInTaskbar, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        Topmost
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=Topmost, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        ShowInTaskbar
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=ShowInTaskbar, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                </local:UniformGridEx>
                            </GroupBox>
                            
                            <GroupBox Grid.Row="4"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Options (WindowChromeBehavior)">
                                <local:UniformGridEx Columns="2"
                                                     ShowGridLines="True">
                                    <Label>
                                        IgnoreTaskbarOnMaximize
                                    </Label>
                                    <CheckBox
                                        Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=IgnoreTaskbarOnMaximize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        KeepBorderOnMaximize
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=KeepBorderOnMaximize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        TryToBeFlickerFree
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=TryToBeFlickerFree, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        ResizeBorderThickness
                                    </Label>
                                    <TextBox Margin="4"
                                             Padding="2"
                                             VerticalAlignment="Center"
                                             Text="{Binding ElementName=Window, Path=ResizeBorderThickness, Mode=TwoWay}" />

                                    <Label>
                                        CornerPreference
                                    </Label>
                                    <ComboBox x:Name="CornerPreferenceComboBox"
                                              Margin="4"
                                              VerticalAlignment="Center"
                                              ItemsSource="{Binding Source={StaticResource CornerPreferenceEnumValues}}"
                                              SelectedItem="{Binding ElementName=Window, Path=CornerPreference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        EnableMinimize (Enable/Disable System Menu Item)
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=ShowMinButton, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                                    <Label>
                                        EnableMaxRestore (Enable/Disable System Menu Item)
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=ShowMaxRestoreButton, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                </local:UniformGridEx>
                            </GroupBox>

                            <GroupBox Grid.Row="5"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Options (GlowWindowBehavior)">
                                <local:UniformGridEx Columns="2"
                                                     ShowGridLines="True">
                                    <Label>
                                        GlowColor
                                    </Label>
                                    <ComboBox Margin="4"
                                              VerticalAlignment="Center"
                                              HorizontalContentAlignment="Stretch"
                                              ItemsSource="{Binding Colors, ElementName=Window}"
                                              SelectedValue="{Binding ElementName=Window, Path=GlowColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              SelectedValuePath="Value">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Grid.Column="0"
                                                               Margin="4 0"
                                                               Text="{Binding}" />
                                                    <Grid Grid.Column="1"
                                                          Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
                                                          Margin="4 0"
                                                          VerticalAlignment="Stretch">
                                                        <Grid.Background>
                                                            <SolidColorBrush Color="{Binding Value}" />
                                                        </Grid.Background>
                                                    </Grid>
                                                </Grid>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>

                                    <Label>
                                        NonActiveGlowColor
                                    </Label>
                                    <ComboBox Margin="4"
                                              VerticalAlignment="Center"
                                              HorizontalContentAlignment="Stretch"
                                              ItemsSource="{Binding Colors, ElementName=Window}"
                                              SelectedValue="{Binding ElementName=Window, Path=NonActiveGlowColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              SelectedValuePath="Value">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Grid.Column="0"
                                                               Margin="4 0"
                                                               Text="{Binding}" />
                                                    <Grid Grid.Column="1"
                                                          Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
                                                          Margin="4 0"
                                                          VerticalAlignment="Stretch">
                                                        <Grid.Background>
                                                            <SolidColorBrush Color="{Binding Value}" />
                                                        </Grid.Background>
                                                    </Grid>
                                                </Grid>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>

                                    <Label>
                                        GlowDepth
                                    </Label>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Margin="4"
                                                 Padding="2"
                                                 Width="30"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=GlowDepth, Mode=TwoWay}" />
                                        <CheckBox x:Name="AnimateGlowDepth" 
                                                  Margin="4"
                                                  Padding="2"
                                                  VerticalAlignment="Center"
                                                  VerticalContentAlignment="Center"
                                                  Checked="AnimateGlowDepth_OnChecked"
                                                  Unchecked="AnimateGlowDepth_OnUnchecked">Animate</CheckBox>
                                    </StackPanel>

                                    <Label>
                                        PreferDWMBorderColor
                                    </Label>
                                    <CheckBox Margin="4"
                                              Padding="2"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=PreferDWMBorderColor, Mode=TwoWay}" />

                                    <Label>
                                        DWMSupportsBorderColor
                                    </Label>
                                    <CheckBox Margin="4"
                                              Padding="2"
                                              VerticalAlignment="Center"
                                              IsEnabled="False"
                                              IsChecked="{Binding ElementName=Window, Path=DWMSupportsBorderColor, Mode=OneWay}" />

                                    <Label>
                                        UseRadialGradientForCorners
                                    </Label>
                                    <CheckBox Margin="4"
                                              Padding="2"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=UseRadialGradientForCorners, Mode=TwoWay}" />
                                </local:UniformGridEx>
                            </GroupBox>
                            
                            <GroupBox Grid.Row="6"
                                      Margin="5"
                                      BorderThickness="0 1 0 0"
                                      Header="Current values">
                                <local:UniformGridEx Columns="2"
                                                     ShowGridLines="True">
                                    <Label>
                                        Position
                                    </Label>
                                    <StackPanel Margin="4"
                                                VerticalAlignment="Center"
                                                Orientation="Horizontal">
                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 IsReadOnly="True"
                                                 Text="{Binding ElementName=Window, Path=Left, Mode=OneWay}" />

                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 IsReadOnly="True"
                                                 Text="{Binding ElementName=Window, Path=Top, Mode=OneWay}" />
                                    </StackPanel>

                                    <Label>
                                        Size
                                    </Label>
                                    <StackPanel Margin="4"
                                                VerticalAlignment="Center"
                                                Orientation="Horizontal">
                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 IsReadOnly="True"
                                                 Text="{Binding ElementName=Window, Path=ActualWidth, Mode=OneWay}" />

                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 IsReadOnly="True"
                                                 Text="{Binding ElementName=Window, Path=ActualHeight, Mode=OneWay}" />
                                    </StackPanel>

                                    <Label>
                                        MinSize
                                    </Label>
                                    <StackPanel Margin="4"
                                                VerticalAlignment="Center"
                                                Orientation="Horizontal">
                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=MinWidth, Mode=TwoWay}" />

                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=MinHeight, Mode=TwoWay}" />

                                        <Button Padding="4"
                                                Click="ButtonResetMinSizesOnClick"
                                                Content="Reset" />
                                    </StackPanel>

                                    <Label>
                                        MaxSize
                                    </Label>
                                    <StackPanel Margin="4"
                                                VerticalAlignment="Center"
                                                Orientation="Horizontal">
                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=MaxWidth, Mode=TwoWay}" />

                                        <TextBox Width="35"
                                                 Margin="0 0 2 0"
                                                 Padding="2"
                                                 VerticalAlignment="Center"
                                                 Text="{Binding ElementName=Window, Path=MaxHeight, Mode=TwoWay}" />

                                        <Button Padding="4"
                                                Click="ButtonResetMaxSizesOnClick"
                                                Content="Reset" />
                                    </StackPanel>

                                    <Label>
                                        IsActive
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=IsActive, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                              IsEnabled="False" />

                                    <Label>
                                        IsNCActive
                                    </Label>
                                    <CheckBox Margin="4"
                                              VerticalAlignment="Center"
                                              IsChecked="{Binding ElementName=Window, Path=IsNCActive, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                              IsEnabled="False" />
                                </local:UniformGridEx>
                            </GroupBox>
                        </Grid>
                    </ScrollViewer>
                </TabItem>

                <TabItem Header="TabControlEx">
                    <StackPanel>
                        <TextBox Margin="5"
                                 HorizontalAlignment="Center"
                                 Text="Lorem ipsum dolor sit amet, consetetur sadipscing" />
{'fraction_non_alphanumeric': 0.06597595981341944, 'fraction_numerical': 0.0132086472909939, 'mean_word_length': 0.6200432326388258, 'pattern_counts': {'":': 0, '<': 635, '<?xml version=': 0, '>': 635, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1615, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6425250', 'n_tokens_mistral': 14757, 'n_tokens_neox': 13110, 'n_words': 2194}