<commit_before>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls">
    <Style x:Key="ToggleSwitch.Win10.Override" BasedOn="{StaticResource MahApps.Metro.Styles.ToggleSwitch.Win10}" TargetType="{x:Type Controls:ToggleSwitch}">
        <Setter Property="ContentPadding" Value="0 0 10 0" />
        <Style.Triggers>
            <Trigger Property="ContentDirection" Value="RightToLeft">
                <Setter Property="ContentPadding" Value="10 0 0 0" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary><commit_msg>Change the template of the ToggleSwitch  - This template has 2 extra content controls to hold/show the on and off labels.  - This improves the usage of the ToggleSwitch together with Margin, cause the control itself has always the same width.  - This can be removed after it will be changed in MahApps...<commit_after>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls">
    <Style x:Key="ToggleSwitch.Win10.Override" BasedOn="{StaticResource MahApps.Metro.Styles.ToggleSwitch.Win10}" TargetType="{x:Type Controls:ToggleSwitch}">
        <Setter Property="ContentPadding" Value="0 0 10 0" />
        <!--
            This template has 2 extra content controls to hold/show the on and off labels.
            This improves the usage of the ToggleSwitch together with Margin, cause the control itself has always the same width.
            This can be removed after it will be changed in MahApps...
        -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Controls:ToggleSwitch}">
                    <Border Padding="{TemplateBinding Padding}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Grid Background="Transparent">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition x:Name="firstCol" Width="*" />
                                <ColumnDefinition x:Name="secCol" Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <ContentControl x:Name="Header"
                                            Grid.ColumnSpan="2"
                                            Margin="{TemplateBinding Controls:ControlsHelper.HeaderMargin}"
                                            Content="{TemplateBinding Header}"
                                            ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                                            ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                            FontFamily="{TemplateBinding HeaderFontFamily}"
                                            FontSize="{TemplateBinding Controls:ControlsHelper.HeaderFontSize}"
                                            FontWeight="{TemplateBinding Controls:ControlsHelper.HeaderFontWeight}"
                                            IsTabStop="False" />
                            <ContentControl x:Name="Content"
                                            Grid.Row="1"
                                            Margin="{TemplateBinding ContentPadding}"
                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                            Content="{TemplateBinding Content}"
                                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                            FontFamily="{TemplateBinding FontFamily}"
                                            FontSize="{TemplateBinding FontSize}"
                                            IsTabStop="False" />
                            <ContentControl x:Name="ContentOnLabel"
                                            Grid.Row="1"
                                            Margin="{TemplateBinding ContentPadding}"
                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                            Content="{TemplateBinding OnLabel}"
                                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                            FontFamily="{TemplateBinding FontFamily}"
                                            FontSize="{TemplateBinding FontSize}"
                                            IsTabStop="False"
                                            Visibility="Hidden" />
                            <ContentControl x:Name="ContentOffLabel"
                                            Grid.Row="1"
                                            Margin="{TemplateBinding ContentPadding}"
                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                            Content="{TemplateBinding OffLabel}"
                                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                            FontFamily="{TemplateBinding FontFamily}"
                                            FontSize="{TemplateBinding FontSize}"
                                            IsTabStop="False"
                                            Visibility="Hidden" />
                            <Controls:ToggleSwitchButton x:Name="Switch"
                                                         Grid.Row="1"
                                                         Grid.Column="1"
                                                         VerticalAlignment="Center"
                                                         Background="{TemplateBinding Background}"
                                                         FocusVisualStyle="{x:Null}"
                                                         IsChecked="{Binding IsChecked, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                         OffSwitchBrush="{TemplateBinding OffSwitchBrush}"
                                                         OnSwitchBrush="{TemplateBinding OnSwitchBrush}"
                                                         SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                         Style="{TemplateBinding ToggleSwitchButtonStyle}"
                                                         ThumbIndicatorBrush="{TemplateBinding ThumbIndicatorBrush}"
                                                         ThumbIndicatorDisabledBrush="{TemplateBinding ThumbIndicatorDisabledBrush}"
                                                         ThumbIndicatorWidth="{TemplateBinding ThumbIndicatorWidth}" />
                        </Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="Header"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         To="0.3"
                                                         Duration="0" />
                                        <DoubleAnimation Storyboard.TargetName="Content"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         To="0.3"
                                                         Duration="0" />
                                        <DoubleAnimation Storyboard.TargetName="ContentOnLabel"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         To="0.3"
                                                         Duration="0" />
                                        <DoubleAnimation Storyboard.TargetName="ContentOffLabel"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         To="0.3"
                                                         Duration="0" />
                                        <DoubleAnimation Storyboard.TargetName="Switch"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         To="0.75"
                                                         Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="True" />
                                <Condition Property="Content" Value="{x:Null}" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="ContentOnLabel" Property="Visibility" Value="Visible" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="False" />
                                <Condition Property="Content" Value="{x:Null}" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="ContentOffLabel" Property="Visibility" Value="Visible" />
                        </MultiTrigger>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Header}" Value="{x:Null}">
                            <Setter TargetName="Header" Property="Visibility" Value="Collapsed" />
                        </DataTrigger>
                        <Trigger Property="ContentDirection" Value="RightToLeft">
                            <Setter Property="ContentPadding" Value="4 0 0 0" />
                            <Setter TargetName="Content" Property="Grid.Column" Value="1" />
                            <Setter TargetName="ContentOnLabel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="ContentOffLabel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="Switch" Property="Grid.Column" Value="0" />
                            <Setter TargetName="firstCol" Property="Width" Value="Auto" />
                            <Setter TargetName="secCol" Property="Width" Value="*" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="ContentDirection" Value="RightToLeft">
                <Setter Property="ContentPadding" Value="10 0 0 0" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>
{'fraction_non_alphanumeric': 0.07837653994407075, 'fraction_numerical': 0.005744085858967576, 'mean_word_length': 1.0864080731630401, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 153, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5043045', 'n_tokens_mistral': 2329, 'n_tokens_neox': 2130, 'n_words': 416}