<commit_before>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:XGraph.Controls"
                    xmlns:markup="clr-namespace:XGraph.Extensions.Markup">

    <!-- Including global resources -->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/XGraph;Component/Resources/All.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!-- GraphView style. -->
    <Style TargetType="{x:Type controls:GraphView}" BasedOn="{StaticResource {x:Type ListBox}}">
        <Setter Property="FontFamily" Value="{StaticResource Segoe_UI_Light_FontFamily}" />
        <Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
        <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
        <Setter Property ="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <controls:AdornerLayeredCanvas x:Name="INNER_DrawingArea" IsItemsHost="True" Background="{StaticResource GraphView_Background_Brush}"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- GraphItem base style. -->
    <Style x:Key="GraphItemBaseStyleKey" TargetType="{x:Type controls:GraphItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
        <Setter Property="Canvas.Left" Value="{Binding PosX, RelativeSource={RelativeSource Self}}"/>
        <Setter Property="Canvas.Top" Value="{Binding PosY, RelativeSource={RelativeSource Self}}"/>
    </Style>

    <!-- GraphItem template when it represents a node. -->
    <ControlTemplate x:Key="GraphItemNodeViewTemplate" TargetType="{x:Type controls:GraphItem}">
        <controls:NodeView Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
    </ControlTemplate>

    <!-- GraphItem style when it represents a node. -->
    <Style x:Key="GraphItemNodeViewDefaultStyleKey" TargetType="{x:Type controls:GraphItem}" BasedOn="{StaticResource GraphItemBaseStyleKey}">
        <Setter Property="Template" Value="{StaticResource GraphItemNodeViewTemplate}" />
    </Style>

    <!-- GraphItem template when it represents a connection. -->
    <ControlTemplate x:Key="GraphItemConnectionTemplate" TargetType="{x:Type controls:GraphItem}">
        <controls:Connection Content="{TemplateBinding Content}" />
    </ControlTemplate>

    <!-- GraphItem style when it represents a connection. -->
    <Style x:Key="GraphItemConnectionDefaultStyleKey" TargetType="{x:Type controls:GraphItem}" BasedOn="{StaticResource GraphItemBaseStyleKey}">
        <Setter Property="Template" Value="{StaticResource GraphItemConnectionTemplate}" />
    </Style>

    <!-- NodeView template. -->
    <ControlTemplate x:Key="NodeViewTemplate" TargetType="{x:Type controls:NodeView}">
        <Grid Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="{markup:GridLength {StaticResource NodeView_Bevel_Size}}" />
            </Grid.RowDefinitions>
            <controls:NodeViewShape x:Name="INNER_BackgroundShape" Fill="{TemplateBinding Background}" BevelLenght="{StaticResource NodeView_Bevel_Size}" Grid.RowSpan="3" />
            <Grid Margin="0,0,0,3">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <controls:MoveThumb Grid.Column="0" x:Name="INNER_Movethumb" VerticalAlignment="Top" />
                <ContentPresenter Grid.Column="1" ContentTemplate="{TemplateBinding ContentTemplate}" />
            </Grid>
            <controls:PortContainer Grid.Row="1" x:Name="PART_PortContainer" Background="{TemplateBinding Background}" />
        </Grid>
    </ControlTemplate>

    <!-- NodeView style. -->
    <Style TargetType="{x:Type controls:NodeView}">
        <Setter Property="Foreground" Value="{StaticResource NodeView_Foreground_Brush}" />
        <Setter Property="Background" Value="{StaticResource NodeView_Background_Brush}" />
        <Setter Property="Template" Value="{StaticResource NodeViewTemplate}" />
    </Style>

    <!-- NodeView default data template for its content. -->
    <DataTemplate x:Key="NodeViewDefaultDataTemplate">
        <StackPanel>
            <TextBlock Text="{Binding DisplayString}" Margin="0,0,6,0" HorizontalAlignment="Right" FontSize="20" />
            <TextBlock Text="{Binding Description}" Margin="0,0,6,0" HorizontalAlignment="Right" FontSize="12" />
        </StackPanel>
    </DataTemplate>
    
    <!-- PortContainer style. -->
    <Style TargetType="{x:Type controls:PortContainer}" BasedOn="{StaticResource {x:Type ItemsControl}}">
        <Setter Property ="Margin" Value="5" />
        <Setter Property ="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <controls:PortContainerPanel IsItemsHost="True" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- PortView template. -->
    <ControlTemplate x:Key="PortViewTemplate" TargetType="{x:Type controls:PortView}">
        <Grid Margin="2" Background="{TemplateBinding Background}">
            <Rectangle x:Name="INNER_Border" StrokeDashArray="4 3" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" Grid.ColumnSpan="3" />
            <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="Center" HorizontalAlignment="{TemplateBinding Direction, Converter={StaticResource PortDirectionToHorizontalAlignmentConverter}}" Grid.Column="1" Margin="5,0" />
            <controls:ConnectorsPresenter x:Name="PART_ConnectorPresenter" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" />
        </Grid>
    </ControlTemplate>

    <!-- PortView style. -->
    <Style TargetType="{x:Type controls:PortView}">
        <Setter Property="Height" Value="{StaticResource PortView_Default_Height}" />
        <Setter Property="Template" Value="{StaticResource PortViewTemplate}" />
        <Setter Property="BorderBrush" Value="{StaticResource Icon_Foreground_Brush}" />
        <Setter Property="BorderThickness" Value="1" />
    </Style>

    <!-- Input PortView default data template for its content. -->
    <DataTemplate x:Key="InputPortViewDefaultDataTemplate">
        <StackPanel Orientation="Horizontal" >
            <TextBlock Text="{Binding DisplayString}" VerticalAlignment="Center"/>
            <Image Source="{Binding Icon}" Width="16" Height="16" Margin="3,0,0,0" />
        </StackPanel>
    </DataTemplate>

    <!-- Output PortView default data template for its content. -->
    <DataTemplate x:Key="OutputPortViewDefaultDataTemplate">
        <StackPanel Orientation="Horizontal" >
            <Image Source="{Binding Icon}" Width="16" Height="16" Margin="0,0,3,0" />
            <TextBlock Text="{Binding DisplayString}" />
        </StackPanel>
    </DataTemplate>

    <!-- MoveThumb template. -->
    <ControlTemplate x:Key="MoveThumbTemplate" TargetType="{x:Type controls:MoveThumb}">
        <Grid x:Name="INNER_RootLayout">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0:0:0.3" To="MouseOver"/>
                        <VisualTransition From="MouseOver" GeneratedDuration="0:0:0.3"/>
                    </VisualStateGroup.Transitions>
                    <VisualState Name="Normal" />
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="INNER_MainCanvas" Storyboard.TargetProperty="(UIElement.Opacity)" To="1" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseLeave">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="INNER_MainCanvas" Storyboard.TargetProperty="(UIElement.Opacity)" To="0" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Canvas x:Name="INNER_MainCanvas" Opacity="0">
                <controls:MoveThumbShape x:Name="INNER_BackgroundShape" Fill="{TemplateBinding Background}" BevelLenght="{TemplateBinding Height}" />
                <Path x:Name="INNER_MoveThumbIcon" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True">
                    <Path.Data>
                        <PathGeometry Figures="m 2 18 -2 0 0 -2 2 0 z m 4 -4 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m 8 -4 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m 12 -4 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m 16 -4 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z" FillRule="NonZero"/>
                    </Path.Data>
                </Path>
            </Canvas>
        </Grid>
    </ControlTemplate><commit_msg>[FCT] Updating the default visibility of the move thumb.<commit_after>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:XGraph.Controls"
                    xmlns:markup="clr-namespace:XGraph.Extensions.Markup">

    <!-- Including global resources -->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/XGraph;Component/Resources/All.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!-- GraphView style. -->
    <Style TargetType="{x:Type controls:GraphView}" BasedOn="{StaticResource {x:Type ListBox}}">
        <Setter Property="FontFamily" Value="{StaticResource Segoe_UI_Light_FontFamily}" />
        <Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
        <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
        <Setter Property ="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <controls:AdornerLayeredCanvas x:Name="INNER_DrawingArea" IsItemsHost="True" Background="{StaticResource GraphView_Background_Brush}"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- GraphItem base style. -->
    <Style x:Key="GraphItemBaseStyleKey" TargetType="{x:Type controls:GraphItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
        <Setter Property="Canvas.Left" Value="{Binding PosX, RelativeSource={RelativeSource Self}}"/>
        <Setter Property="Canvas.Top" Value="{Binding PosY, RelativeSource={RelativeSource Self}}"/>
    </Style>

    <!-- GraphItem template when it represents a node. -->
    <ControlTemplate x:Key="GraphItemNodeViewTemplate" TargetType="{x:Type controls:GraphItem}">
        <controls:NodeView Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
    </ControlTemplate>

    <!-- GraphItem style when it represents a node. -->
    <Style x:Key="GraphItemNodeViewDefaultStyleKey" TargetType="{x:Type controls:GraphItem}" BasedOn="{StaticResource GraphItemBaseStyleKey}">
        <Setter Property="Template" Value="{StaticResource GraphItemNodeViewTemplate}" />
    </Style>

    <!-- GraphItem template when it represents a connection. -->
    <ControlTemplate x:Key="GraphItemConnectionTemplate" TargetType="{x:Type controls:GraphItem}">
        <controls:Connection Content="{TemplateBinding Content}" />
    </ControlTemplate>

    <!-- GraphItem style when it represents a connection. -->
    <Style x:Key="GraphItemConnectionDefaultStyleKey" TargetType="{x:Type controls:GraphItem}" BasedOn="{StaticResource GraphItemBaseStyleKey}">
        <Setter Property="Template" Value="{StaticResource GraphItemConnectionTemplate}" />
    </Style>

    <!-- NodeView template. -->
    <ControlTemplate x:Key="NodeViewTemplate" TargetType="{x:Type controls:NodeView}">
        <Grid Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="{markup:GridLength {StaticResource NodeView_Bevel_Size}}" />
            </Grid.RowDefinitions>
            <controls:NodeViewShape x:Name="INNER_BackgroundShape" Fill="{TemplateBinding Background}" BevelLenght="{StaticResource NodeView_Bevel_Size}" Grid.RowSpan="3" />
            <Grid Margin="0,0,0,3">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <controls:MoveThumb Grid.Column="0" x:Name="INNER_Movethumb" VerticalAlignment="Top" />
                <ContentPresenter Grid.Column="1" ContentTemplate="{TemplateBinding ContentTemplate}" />
            </Grid>
            <controls:PortContainer Grid.Row="1" x:Name="PART_PortContainer" Background="{TemplateBinding Background}" />
        </Grid>
    </ControlTemplate>

    <!-- NodeView style. -->
    <Style TargetType="{x:Type controls:NodeView}">
        <Setter Property="Foreground" Value="{StaticResource NodeView_Foreground_Brush}" />
        <Setter Property="Background" Value="{StaticResource NodeView_Background_Brush}" />
        <Setter Property="Template" Value="{StaticResource NodeViewTemplate}" />
    </Style>

    <!-- NodeView default data template for its content. -->
    <DataTemplate x:Key="NodeViewDefaultDataTemplate">
        <StackPanel>
            <TextBlock Text="{Binding DisplayString}" Margin="0,0,6,0" HorizontalAlignment="Right" FontSize="20" />
            <TextBlock Text="{Binding Description}" Margin="0,0,6,0" HorizontalAlignment="Right" FontSize="12" />
        </StackPanel>
    </DataTemplate>
    
    <!-- PortContainer style. -->
    <Style TargetType="{x:Type controls:PortContainer}" BasedOn="{StaticResource {x:Type ItemsControl}}">
        <Setter Property ="Margin" Value="5" />
        <Setter Property ="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <controls:PortContainerPanel IsItemsHost="True" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- PortView template. -->
    <ControlTemplate x:Key="PortViewTemplate" TargetType="{x:Type controls:PortView}">
        <Grid Margin="2" Background="{TemplateBinding Background}">
            <Rectangle x:Name="INNER_Border" StrokeDashArray="4 3" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" Grid.ColumnSpan="3" />
            <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="Center" HorizontalAlignment="{TemplateBinding Direction, Converter={StaticResource PortDirectionToHorizontalAlignmentConverter}}" Grid.Column="1" Margin="5,0" />
            <controls:ConnectorsPresenter x:Name="PART_ConnectorPresenter" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" />
        </Grid>
    </ControlTemplate>

    <!-- PortView style. -->
    <Style TargetType="{x:Type controls:PortView}">
        <Setter Property="Height" Value="{StaticResource PortView_Default_Height}" />
        <Setter Property="Template" Value="{StaticResource PortViewTemplate}" />
        <Setter Property="BorderBrush" Value="{StaticResource Icon_Foreground_Brush}" />
        <Setter Property="BorderThickness" Value="1" />
    </Style>

    <!-- Input PortView default data template for its content. -->
    <DataTemplate x:Key="InputPortViewDefaultDataTemplate">
        <StackPanel Orientation="Horizontal" >
            <TextBlock Text="{Binding DisplayString}" VerticalAlignment="Center"/>
            <Image Source="{Binding Icon}" Width="16" Height="16" Margin="3,0,0,0" />
        </StackPanel>
    </DataTemplate>

    <!-- Output PortView default data template for its content. -->
    <DataTemplate x:Key="OutputPortViewDefaultDataTemplate">
        <StackPanel Orientation="Horizontal" >
            <Image Source="{Binding Icon}" Width="16" Height="16" Margin="0,0,3,0" />
            <TextBlock Text="{Binding DisplayString}" />
        </StackPanel>
    </DataTemplate>

    <!-- MoveThumb template. -->
    <ControlTemplate x:Key="MoveThumbTemplate" TargetType="{x:Type controls:MoveThumb}">
        <Grid x:Name="INNER_RootLayout">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0:0:0.3" To="MouseOver"/>
                        <VisualTransition From="MouseOver" GeneratedDuration="0:0:0.3"/>
                    </VisualStateGroup.Transitions>
                    <VisualState Name="Normal" />
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="INNER_MainCanvas" Storyboard.TargetProperty="(UIElement.Opacity)" To="1" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseLeave">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="INNER_MainCanvas" Storyboard.TargetProperty="(UIElement.Opacity)" To="0.5" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Canvas x:Name="INNER_MainCanvas" Opacity="0.5">
                <controls:MoveThumbShape x:Name="INNER_BackgroundShape" Fill="{TemplateBinding Background}" BevelLenght="{TemplateBinding Height}" />
                <Path x:Name="INNER_MoveThumbIcon" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True">
                    <Path.Data>
                        <PathGeometry Figures="m 2 18 -2 0 0 -2 2 0 z m 4 -4 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m 8 -4 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m 12 -4 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m 16 -4 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z m -4 0 -2 0 0 -2 2 0 z" FillRule="NonZero"/>
                    </Path.Data>
                </Path>
            </Canvas>
        </Grid>
    </ControlTemplate>
{'fraction_non_alphanumeric': 0.1322734666037043, 'fraction_numerical': 0.019728212393095124, 'mean_word_length': 2.853619086130206, 'pattern_counts': {'":': 0, '<': 291, '<?xml version=': 0, '>': 291, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6180224', 'n_tokens_mistral': 5468, 'n_tokens_neox': 4930, 'n_words': 1145}