<commit_before>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
                    xmlns:dockablz="http://dragablz.net/winfx/xaml/dockablz"
                    xmlns:converters="clr-namespace:Dragablz.Converters;assembly=Dragablz"
                    xmlns:tcc="clr-namespace:TCC.Controls"
                    xmlns:local="clr-namespace:Dragablz.Themes;assembly=Dragablz">

    <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <converters:EqualityToVisibilityConverter x:Key="EqualityToVisibilityConverter" />
    <converters:BooleanAndToVisibilityConverter x:Key="BooleanAndToVisibilityConverter" />
    <converters:EqualityToBooleanConverter x:Key="EqualityToBooleanConverter" />
    <converters:ShowDefaultCloseButtonConverter x:Key="ShowDefaultCloseButtonConverter" />
    <local:BrushToRadialGradientBrushConverter x:Key="BrushToRadialGradientBrushConverter" />    

    <Style x:Key="MaterialDesignFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Thumb}" x:Key="MaterialDesignInvisibleThumbStyle">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Background="{TemplateBinding Background}" >
                        <tcc:Ripple></tcc:Ripple>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="MaterialDesignMenuCommandButtonStyle">
        <Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Opacity" Value=".8"/>
        <Setter Property="Width" Value="24"/>
        <Setter Property="Height" Value="20"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDefaulted" Value="true">
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="border" Value=".5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{x:Static dragablz:DragablzColors.WindowGlassBrush}"/>
                <Setter Property="Foreground" Value="{x:Static SystemColors.HighlightTextBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
                <Setter Property="Opacity" Value="1"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="MaterialDesignCloseItemCommandButtonStyle" BasedOn="{StaticResource MaterialDesignMenuCommandButtonStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <Ellipse Width="{TemplateBinding Width}"
                                 Height="{TemplateBinding Height}"
                                 Fill="{TemplateBinding Background}"/>
                        <Path x:Name="Path"
                              Data="M0.5,71 L70,0.5 M0.5,1 L70,70.5" 
                              Width="6" Height="6"
                              Stretch="Uniform"
                              Stroke="{TemplateBinding Foreground}"
                              StrokeThickness="1.5"
                              StrokeStartLineCap="Square" 
                              StrokeEndLineCap="Square"
                              SnapsToDevicePixels="True" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
        <Setter Property="Width" Value="12" />
        <Setter Property="Height" Value="12" />
        <Setter Property="Margin" Value="0 0 2 0" />
        <Setter Property="Opacity" Value=".75" />
        <Setter Property="Foreground" Value="#5fff" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
                <Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightForegroundBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="MaterialDesignAddItemCommandButtonStyle" BasedOn="{StaticResource MaterialDesignMenuCommandButtonStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <Ellipse Width="{TemplateBinding Width}"
                                 Height="{TemplateBinding Height}"
                                 Fill="{TemplateBinding Background}"/>
                        <Path x:Name="Path"
                              Data="M38,6L38.0003451911513,70.6666666666666 M70.3336667356886,38L5.50002465137562,38" 
                              Width="6" Height="6"
                              Stretch="Uniform"
                              Stroke="{TemplateBinding Foreground}"
                              StrokeThickness="1.5"
                              StrokeStartLineCap="Square" 
                              StrokeEndLineCap="Square"
                              SnapsToDevicePixels="True" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
        <Setter Property="Width" Value="12" />
        <Setter Property="Height" Value="12" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="VerticalAlignment" Value="Center" />

        <Setter Property="Margin" Value="4 0 2 0" />
        <Setter Property="Foreground" Value="#9fff" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
                <Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightForegroundBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    
    
    <Style x:Key="MaterialDesignDragableTabItemStyle"  TargetType="{x:Type dragablz:DragablzItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
        <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="local:MaterialDesignAssist.IndicatorBrush" Value="{DynamicResource SecondaryAccentBrush}" />
        <Setter Property="Margin" Value="0 0 0 0"/>
        <Setter Property="Padding" Value="8"/>
        <Setter Property="MinWidth" Value="80" />
        <Setter Property="Height" Value="40" />
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="TextBlock.FontWeight" Value="Medium" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type dragablz:DragablzItem}">
                    <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" 
                                Background="{TemplateBinding Background}"                                          
                                Margin="0 0 0 0">
                            <local:Ripple HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                                                      x:Name="contentPresenter"                                                                                            
                                                      Margin="{TemplateBinding Control.Padding}"
                                                      Opacity=".87"/>
                                    <Thumb Grid.Column="0" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" 
                                           x:Name="PART_Thumb"
                                           Style="{StaticResource MaterialDesignInvisibleThumbStyle}" />
                                    <Button Grid.Column="1"
                                            Name="CloseButton"
                                            Style="{StaticResource MaterialDesignCloseItemCommandButtonStyle}"                                            
                                            Command="{x:Static dragablz:TabablzControl.CloseItemCommand}"
                                            CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                        <Button.LayoutTransform>
                                            <ScaleTransform ScaleX="0"/>
                                        </Button.LayoutTransform>
                                        <Button.Visibility>
                                            <MultiBinding Converter="{StaticResource ShowDefaultCloseButtonConverter}">
                                                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="ShowDefaultCloseButton" />
                                                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="FixedHeaderCount" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="LogicalIndex" />
                                            </MultiBinding>
                                        </Button.Visibility>
                                    </Button>
                                </Grid>
                            </local:Ripple>
                        </Border>
                        <Border x:Name="SelectionHighlightBorder" Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:MaterialDesignAssist.IndicatorBrush)}" Height="2"
                                Grid.Row="1"
                                Visibility="Hidden"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="dragablz:TabablzControl.IsWrappingTabItem" Value="True">
                            <Setter TargetName="contentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.Header}" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="1"/>
                            <Setter TargetName="SelectionHighlightBorder" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(LayoutTransform).(ScaleTransform.ScaleX)"
                                                         Duration="0:0:0.15" To="1">
                                            <DoubleAnimation.EasingFunction>
                                                <QuadraticEase />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(LayoutTransform).(ScaleTransform.ScaleX)"
                                                         Duration="0:0:0.15" To="0">
                                            <DoubleAnimation.EasingFunction>
                                                <QuadraticEase />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MaterialDesignDragableTabItemVerticalStyle" TargetType="{x:Type dragablz:DragablzItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
        <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Margin" Value="0 0 0 0"/>
        <Setter Property="Width" Value="80" />
        <Setter Property="MinHeight" Value="40" />
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="TextBlock.FontWeight" Value="Medium" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type dragablz:DragablzItem}">
                    <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" 
                                Background="{TemplateBinding Background}"                                          
                                Margin="0 0 0 0">
                            <local:Ripple HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                                                      x:Name="contentPresenter"
                                                      RenderTransformOrigin=".5, .5">
                                        <ContentPresenter.RenderTransform>
                                            <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(dragablz:DragablzItem.ContentRotateTransformAngle)}" />
                                        </ContentPresenter.RenderTransform>
                                    </ContentPresenter>
                                    <Thumb Grid.Row="0" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" 
                                           x:Name="PART_Thumb"
                                           Style="{StaticResource MaterialDesignInvisibleThumbStyle}" />
                                    <Button Grid.Row="1"
                                            x:Name="CloseButton"
                                            Style="{StaticResource MaterialDesignCloseItemCommandButtonStyle}"                                        
                                            Command="{x:Static dragablz:TabablzControl.CloseItemCommand}"
                                            CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                        <Button.Visibility>
                                            <MultiBinding Converter="{StaticResource ShowDefaultCloseButtonConverter}">
                                                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="ShowDefaultCloseButton" />
                                                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="FixedHeaderCount" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="LogicalIndex" />
                                            </MultiBinding>
                                        </Button.Visibility>
                                        <Button.LayoutTransform>
                                            <ScaleTransform ScaleX="0"/>
                                        </Button.LayoutTransform>
                                    </Button>
                                </Grid>
                            </local:Ripple>
                        </Border>
                        <Border x:Name="SelectionHighlightBorder" Background="{DynamicResource SecondaryAccentBrush}" Width="2"
                                Grid.Column="1"
                                Visibility="Hidden"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="dragablz:TabablzControl.IsWrappingTabItem" Value="True">
                            <Setter TargetName="contentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.Header}" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="1"/>
                            <Setter TargetName="SelectionHighlightBorder" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(LayoutTransform).(ScaleTransform.ScaleX)"
                                                         Duration="0:0:0.15" To="1">
                                            <DoubleAnimation.EasingFunction>
                                                <QuadraticEase />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(LayoutTransform).(ScaleTransform.ScaleX)"
                                                         Duration="0:0:0.15" To="0">
                                            <DoubleAnimation.EasingFunction>
                                                <QuadraticEase />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MaterialDesignMetroBaseWindowButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{DynamicResource TransparentWhiteBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource WhiteColorBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid Background="{TemplateBinding Background}">
                        <ContentPresenter x:Name="contentPresenter"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          RecognizesAccessKey="True"
                                          Opacity="0.75" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value=".5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SemiTransparentWhiteBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource HighlightBrush}" />
                <Setter Property="Foreground" Value="White" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="#ADADAD" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="MaterialDesignToolWindowButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignMetroBaseWindowButtonStyle}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Width" Value="30" />
        <Setter Property="MaxHeight" Value="30" />
        <Setter Property="Padding" Value="0" />
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Visibility" Value="Collapsed" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type dragablz:HeaderedDragablzItem}" x:Key="MaterialDesignToolDragablzItemStyle">
        <Style.Setters>
            <Setter Property="BorderBrush" Value="{DynamicResource AccentColorBrush2}" />
            <Setter Property="BorderThickness" Value="4" />
            <Setter Property="Canvas.Left" Value="{Binding X, RelativeSource={RelativeSource Self}}" />
            <Setter Property="Canvas.Top" Value="{Binding Y, RelativeSource={RelativeSource Self}}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type dragablz:HeaderedDragablzItem}">
                        <Grid Margin="{TemplateBinding Margin}">
                            <Border Background="{DynamicResource WhiteColorBrush}">
                                <Border.Effect>
                                    <DropShadowEffect BlurRadius="10" ShadowDepth="5" Direction="315" Color="{DynamicResource AccentColor2}" Opacity=".5" />
                                </Border.Effect>
                            </Border>
                            <Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
                                <DockPanel>
                                    <Grid DockPanel.Dock="Top" Background="{TemplateBinding BorderBrush}">
                                        <Thumb HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" x:Name="PART_Thumb"
                                               Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                               />
                                        <DockPanel Margin="{TemplateBinding Control.Padding }">
                                            <Button DockPanel.Dock="Right"
                                                    Command="{x:Static dockablz:Layout.CloseFloatingItem}"
                                                    CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                                    Margin="1 0 0 0"
                                                    Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
                                                    Focusable="False"
                                                    RenderOptions.EdgeMode="Aliased"
                                                    >
                                                <Path Data="M 10.009,1.704 L 8.331,0.026 5.03,3.327 1.703,0 0,1.704 3.326,5.031 0.025,8.332 1.703,10.009 5.004,6.708 8.305,10.009 10.009,8.305 6.708,5.005"
                                                      SnapsToDevicePixels="True"
                                                      Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" />
                                            </Button>
                                            <Button DockPanel.Dock="Right"
                                                    Command="{x:Static dockablz:Layout.UnfloatItemCommand}"
                                                    CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                                    Margin="1 0 0 0"
                                                    Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
                                                    >
                                                <Path Width="12" Height="12" Stretch="UniformToFill" Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" Data="M 19 19 H 5 V 5 h 7 V 3 H 5 C 3.89 3 3 3.9 3 5 v 14 c 0 1.1 0.89 2 2 2 h 14 c 1.1 0 2 -0.9 2 -2 v -7 h -2 v 7 z M 14 3 v 2 h 3.59 L 7.76 14.83 9.17 16.24 19 6.41 V 10 h 2 V 3 h -7 z" />
                                            </Button>
                                            <Button DockPanel.Dock="Right"
                                                    Command="{x:Static dockablz:Layout.MaximiseFloatingItem}"
                                                    CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                                    Margin="1 0 0 0"
                                                    Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
                                                    >
                                                <Path Width="10"
                                                      Height="10"
                                                      Data="F1M0,0L0,9 9,9 9,0 0,0 0,3 8,3 8,8 1,8 1,3z"
                                                      SnapsToDevicePixels="True"
                                                      Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" />
                                            </Button>
                                            <Button DockPanel.Dock="Right"
                                                    Command="{x:Static dockablz:Layout.RestoreFloatingItem}"
                                                    CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                                    Margin="1 0 0 0"
                                                    Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
                                                    >
                                                <Path Width="10"
                                                      Height="10"
                                                      Data="F1M0,10L0,3 3,3 3,0 10,0 10,2 4,2 4,3 7,3 7,6 6,6 6,5 1,5 1,10z M1,10L7,10 7,7 10,7 10,2 9,2 9,6 6,6 6,9 1,9z"
                                                      SnapsToDevicePixels="True"
                                                      Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" />
                                            </Button>
                                            <ContentPresenter Content="{TemplateBinding HeaderContent}"                                                               
                                                              ContentTemplate="{TemplateBinding HeaderContentTemplate}" 
                                                              ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" 
                                                              ContentTemplateSelector="{TemplateBinding HeaderContentTemplateSelector}"                                                          
                                                              SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                                                              IsHitTestVisible="False"
                                                          />
                                        </DockPanel>
                                    </Grid>
                                    <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                                                      Margin="{TemplateBinding Control.Padding }"/>
                                </DockPanel>
                            </Border>
                            <Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                   Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Left}"
                                   IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
                                   dragablz:DragablzItem.SizeGrip="Left"
                                   HorizontalAlignment="Left"
                                   VerticalAlignment="Stretch"
                                   Cursor="SizeWE"
                                   />
                            <Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                   Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Top}"
                                   IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
                                   dragablz:DragablzItem.SizeGrip="Top"
                                   HorizontalAlignment="Stretch"
                                   VerticalAlignment="Top"
                                   Cursor="SizeNS"
                                   />
                            <Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                   Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
                                   IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
                                   dragablz:DragablzItem.SizeGrip="Right"
                                   HorizontalAlignment="Right"
                                   VerticalAlignment="Stretch"
                                   Cursor="SizeWE"
                                   />
                            <Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                   Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
                                   IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
                                   dragablz:DragablzItem.SizeGrip="Bottom"
                                   HorizontalAlignment="Stretch"
                                   VerticalAlignment="Bottom"
                                   Cursor="SizeNS"
                                   />
                            <Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                   Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
                                   Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
                                   IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
                                   dragablz:DragablzItem.SizeGrip="TopLeft"
                                   HorizontalAlignment="Left"
                                   VerticalAlignment="Top"
                                   Cursor="SizeNWSE"
                                   />
                            <Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                   Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
                                   Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
                                   IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
                                   dragablz:DragablzItem.SizeGrip="TopRight"
                                   HorizontalAlignment="Right"
                                   VerticalAlignment="Top"
                                   Cursor="SizeNESW"
                                   />
                            <Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                   Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
                                   Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
                                   IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
                                   dragablz:DragablzItem.SizeGrip="BottomRight"
                                   HorizontalAlignment="Right"
                                   VerticalAlignment="Bottom"
                                   Cursor="SizeNWSE"
                                   />
                            <Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
                                   Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
                                   Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
                                   IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
                                   dragablz:DragablzItem.SizeGrip="BottomLeft"                                   
                                   HorizontalAlignment="Left"
                                   VerticalAlignment="Bottom"
                                   Cursor="SizeNESW"
                                   />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style.Setters>
        <Style.Triggers>
            <Trigger Property="dockablz:Layout.FloatingItemState" Value="Maximized">
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="Canvas.Left" Value="0" />
                <Setter Property="Canvas.Top" Value="0" />
                <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type dockablz:Layout}}, Path=ActualWidth}" />
                <Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type dockablz:Layout}}, Path=ActualHeight}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="TabablzScrollViewerControlTemplate" TargetType="{x:Type ScrollViewer}">
        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
            <ScrollBar x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"<commit_msg>added floating dragablz items style<commit_after>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
                    xmlns:dockablz="http://dragablz.net/winfx/xaml/dockablz"
                    xmlns:converters="clr-namespace:Dragablz.Converters;assembly=Dragablz"
                    xmlns:tcc="clr-namespace:TCC.Controls"
                    xmlns:local="clr-namespace:Dragablz.Themes;assembly=Dragablz">

    <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <converters:EqualityToVisibilityConverter x:Key="EqualityToVisibilityConverter" />
    <converters:BooleanAndToVisibilityConverter x:Key="BooleanAndToVisibilityConverter" />
    <converters:EqualityToBooleanConverter x:Key="EqualityToBooleanConverter" />
    <converters:ShowDefaultCloseButtonConverter x:Key="ShowDefaultCloseButtonConverter" />
    <local:BrushToRadialGradientBrushConverter x:Key="BrushToRadialGradientBrushConverter" />    

    <Style x:Key="MaterialDesignFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Thumb}" x:Key="InvisibleThumbStyle">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Background="{TemplateBinding Background}" >
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Thumb}" x:Key="MaterialDesignInvisibleThumbStyle">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Background="{TemplateBinding Background}" >
                        <tcc:Ripple></tcc:Ripple>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="MaterialDesignMenuCommandButtonStyle">
        <Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Opacity" Value=".8"/>
        <Setter Property="Width" Value="24"/>
        <Setter Property="Height" Value="20"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDefaulted" Value="true">
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="border" Value=".5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{x:Static dragablz:DragablzColors.WindowGlassBrush}"/>
                <Setter Property="Foreground" Value="{x:Static SystemColors.HighlightTextBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
                <Setter Property="Opacity" Value="1"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="MaterialDesignCloseItemCommandButtonStyle" BasedOn="{StaticResource MaterialDesignMenuCommandButtonStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <Ellipse Width="{TemplateBinding Width}"
                                 Height="{TemplateBinding Height}"
                                 Fill="{TemplateBinding Background}"/>
                        <Path x:Name="Path"
                              Data="M0.5,71 L70,0.5 M0.5,1 L70,70.5" 
                              Width="6" Height="6"
                              Stretch="Uniform"
                              Stroke="{TemplateBinding Foreground}"
                              StrokeThickness="1.5"
                              StrokeStartLineCap="Square" 
                              StrokeEndLineCap="Square"
                              SnapsToDevicePixels="True" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
        <Setter Property="Width" Value="12" />
        <Setter Property="Height" Value="12" />
        <Setter Property="Margin" Value="0 0 2 0" />
        <Setter Property="Opacity" Value=".75" />
        <Setter Property="Foreground" Value="#5fff" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
                <Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightForegroundBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="MaterialDesignAddItemCommandButtonStyle" BasedOn="{StaticResource MaterialDesignMenuCommandButtonStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <Ellipse Width="{TemplateBinding Width}"
                                 Height="{TemplateBinding Height}"
                                 Fill="{TemplateBinding Background}"/>
                        <Path x:Name="Path"
                              Data="M38,6L38.0003451911513,70.6666666666666 M70.3336667356886,38L5.50002465137562,38" 
                              Width="6" Height="6"
                              Stretch="Uniform"
                              Stroke="{TemplateBinding Foreground}"
                              StrokeThickness="1.5"
                              StrokeStartLineCap="Square" 
                              StrokeEndLineCap="Square"
                              SnapsToDevicePixels="True" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
        <Setter Property="Width" Value="12" />
        <Setter Property="Height" Value="12" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="VerticalAlignment" Value="Center" />

        <Setter Property="Margin" Value="4 0 2 0" />
        <Setter Property="Foreground" Value="#9fff" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
                <Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightForegroundBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>


    <Style x:Key="MaterialDesignDragableTabItemStyle"  TargetType="{x:Type dragablz:DragablzItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
        <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="local:MaterialDesignAssist.IndicatorBrush" Value="{DynamicResource SecondaryAccentBrush}" />
        <Setter Property="Margin" Value="0 0 0 0"/>
        <Setter Property="Padding" Value="8"/>
        <Setter Property="MinWidth" Value="80" />
        <Setter Property="Height" Value="40" />
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="TextBlock.FontWeight" Value="Medium" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type dragablz:DragablzItem}">
                    <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" 
                                Background="{TemplateBinding Background}"                                          
                                Margin="0 0 0 0">
                            <local:Ripple HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                                                      x:Name="contentPresenter"                                                                                            
                                                      Margin="{TemplateBinding Control.Padding}"
                                                      Opacity=".87"/>
                                    <Thumb Grid.Column="0" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" 
                                           x:Name="PART_Thumb"
                                           Style="{StaticResource MaterialDesignInvisibleThumbStyle}" />
                                    <Button Grid.Column="1"
                                            Name="CloseButton"
                                            Style="{StaticResource MaterialDesignCloseItemCommandButtonStyle}"                                            
                                            Command="{x:Static dragablz:TabablzControl.CloseItemCommand}"
                                            CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                        <Button.LayoutTransform>
                                            <ScaleTransform ScaleX="0"/>
                                        </Button.LayoutTransform>
                                        <Button.Visibility>
                                            <MultiBinding Converter="{StaticResource ShowDefaultCloseButtonConverter}">
                                                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="ShowDefaultCloseButton" />
                                                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="FixedHeaderCount" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="LogicalIndex" />
                                            </MultiBinding>
                                        </Button.Visibility>
                                    </Button>
                                </Grid>
                            </local:Ripple>
                        </Border>
                        <Border x:Name="SelectionHighlightBorder" Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:MaterialDesignAssist.IndicatorBrush)}" Height="2"
                                Grid.Row="1"
                                Visibility="Hidden"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="dragablz:TabablzControl.IsWrappingTabItem" Value="True">
                            <Setter TargetName="contentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.Header}" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="1"/>
                            <Setter TargetName="SelectionHighlightBorder" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(LayoutTransform).(ScaleTransform.ScaleX)"
                                                         Duration="0:0:0.15" To="1">
                                            <DoubleAnimation.EasingFunction>
                                                <QuadraticEase />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(LayoutTransform).(ScaleTransform.ScaleX)"
                                                         Duration="0:0:0.15" To="0">
                                            <DoubleAnimation.EasingFunction>
                                                <QuadraticEase />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MaterialDesignDragableTabItemVerticalStyle" TargetType="{x:Type dragablz:DragablzItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
        <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Margin" Value="0 0 0 0"/>
        <Setter Property="Width" Value="80" />
        <Setter Property="MinHeight" Value="40" />
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="TextBlock.FontWeight" Value="Medium" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type dragablz:DragablzItem}">
                    <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" 
                                Background="{TemplateBinding Background}"                                          
                                Margin="0 0 0 0">
                            <local:Ripple HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                                                      x:Name="contentPresenter"
                                                      RenderTransformOrigin=".5, .5">
                                        <ContentPresenter.RenderTransform>
                                            <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(dragablz:DragablzItem.ContentRotateTransformAngle)}" />
                                        </ContentPresenter.RenderTransform>
                                    </ContentPresenter>
                                    <Thumb Grid.Row="0" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" 
                                           x:Name="PART_Thumb"
                                           Style="{StaticResource MaterialDesignInvisibleThumbStyle}" />
                                    <Button Grid.Row="1"
                                            x:Name="CloseButton"
                                            Style="{StaticResource MaterialDesignCloseItemCommandButtonStyle}"                                        
                                            Command="{x:Static dragablz:TabablzControl.CloseItemCommand}"
                                            CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                        <Button.Visibility>
                                            <MultiBinding Converter="{StaticResource ShowDefaultCloseButtonConverter}">
                                                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="ShowDefaultCloseButton" />
                                                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="FixedHeaderCount" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="LogicalIndex" />
                                            </MultiBinding>
                                        </Button.Visibility>
                                        <Button.LayoutTransform>
                                            <ScaleTransform ScaleX="0"/>
                                        </Button.LayoutTransform>
                                    </Button>
                                </Grid>
                            </local:Ripple>
                        </Border>
                        <Border x:Name="SelectionHighlightBorder" Background="{DynamicResource SecondaryAccentBrush}" Width="2"
                                Grid.Column="1"
                                Visibility="Hidden"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="dragablz:TabablzControl.IsWrappingTabItem" Value="True">
                            <Setter TargetName="contentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.Header}" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="1"/>
                            <Setter TargetName="SelectionHighlightBorder" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(LayoutTransform).(ScaleTransform.ScaleX)"
                                                         Duration="0:0:0.15" To="1">
                                            <DoubleAnimation.EasingFunction>
                                                <QuadraticEase />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(LayoutTransform).(ScaleTransform.ScaleX)"
                                                         Duration="0:0:0.15" To="0">
                                            <DoubleAnimation.EasingFunction>
                                                <QuadraticEase />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MaterialDesignMetroBaseWindowButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{DynamicResource TransparentWhiteBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource WhiteColorBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid Background="{TemplateBinding Background}">
                        <ContentPresenter x:Name="contentPresenter"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          RecognizesAccessKey="True"
                                          Opacity="0.75" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value=".5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SemiTransparentWhiteBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource HighlightBrush}" />
                <Setter Property="Foreground" Value="White" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="#ADADAD" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="MaterialDesignToolWindowButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignMetroBaseWindowButtonStyle}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Width" Value="30" />
        <Setter Property="MaxHeight" Value="30" />
        <Setter Property="Padding" Value="0" />
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Visibility" Value="Collapsed" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type dragablz:DragablzItem}" x:Key="MaterialDesignToolDragablzItemStyle">
        <Style.Setters>
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="Canvas.Left" Value="{Binding X, RelativeSource={RelativeSource Self}}" />
            <Setter Property="Canvas.Top" Value="{Binding Y, RelativeSource={RelativeSource Self}}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type dragablz:DragablzItem}">
                        <Grid Margin="{TemplateBinding Margin}">
                            <Border Background="{DynamicResource WhiteColorBrush}">
                                <Border.Effect>
                                    <DropShadowEffect BlurRadius="10" ShadowDepth="5" Direction="315" Color="{DynamicResource AccentColor2}" Opacity=".5" />
                                </Border.Effect>
                            </Border>
                            <Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
                                    <Grid DockPanel.Dock="Top" Background="{TemplateBinding BorderBrush}">
                                            <Button DockPanel.Dock="Right"
                                                    Command="{x:Static dockablz:Layout.UnfloatItemCommand}"
                                                    CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                                    Margin="1 0 0 0"
                                                    Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
                                                    >
                                                <Path Width="12" Height="12" Stretch="UniformToFill" Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" Data="M 19 19 H 5 V 5 h 7 V 3 H 5 C 3.89 3 3 3.9 3 5 v 14 c 0 1.1 0.89 2 2 2 h 14 c 1.1 0 2 -0.9 2 -2 v -7 h -2 v 7 z M 14 3 v 2 h 3.59 L 7.76 14.83 9.17 16.24 19 6.41 V 10 h 2 V 3 h -7 z" />
                                            </Button>
                                            <ContentPresenter Content="{TemplateBinding Content}"                                                               
                                                              ContentTemplate="{TemplateBinding ContentTemplate}" 
                                                              ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" 
                                                              ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"                                                          
                                                              SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                                                              IsHitTestVisible="True"
                                                          />
                                        <Thumb HorizontalAlignment="Left" VerticalContentAlignment="Stretch" x:Name="PART_Thumb"
                                               Style="{StaticResource InvisibleThumbStyle}" Width="30" Height="30"
                                               Margin="6 2 0 0" VerticalAlignment="Top" Background="Transparent"
                                        />
                                    </Grid>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style.Setters>
        <Style.Triggers>
            <Trigger Property="dockablz:Layout.FloatingItemState" Value="Maximized">
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="Canvas.Left" Value="0" />
                <Setter Property="Canvas.Top" Value="0" />
                <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type dockablz:Layout}}, Path=ActualWidth}" />
                <Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type dockablz:Layout}}, Path=ActualHeight}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="TabablzScrollViewerControlTemplate" TargetType="{x:Type ScrollViewer}">
        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
            <ScrollBar x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"
{'fraction_non_alphanumeric': 0.09582142903735014, 'fraction_numerical': 0.010593192699568184, 'mean_word_length': 1.4826402383728463, 'pattern_counts': {'":': 0, '<': 807, '<?xml version=': 0, '>': 805, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 542, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6942511', 'n_tokens_mistral': 16893, 'n_tokens_neox': 14991, 'n_words': 2602}