<commit_before>﻿<catel:DataWindow x:Class="Orc.FilterBuilder.Views.EditFilterWindow"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:net40="clr-namespace:Orc.FilterBuilder"
                  xmlns:converters="clr-namespace:Orc.FilterBuilder.Converters"
                  xmlns:catel="http://catel.codeplex.com"
                  xmlns:markup="clr-namespace:Orc.FilterBuilder.Markup"
                  xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                  xmlns:behaviors="clr-namespace:Orc.FilterBuilder.Behaviors"
                  SizeToContent="Manual" ResizeMode="CanResizeWithGrip">

    <Window.Resources>
        <converters:ConditionTreeItemConverter x:Key="ConditionTreeItemConverter" />
        <BooleanToVisibilityConverter x:Key="VisibilityConverter"/>
        <converters:ValueControlTypeVisibilityConverter x:Key="ValueControlTypeVisibilityConverter"/>

        <Geometry x:Key="AddGeometry">M431.704,432l0,260.501l-96,0l0,-260.501l-260.501,-5.68434e-14l1.42109e-14,-96l260.501,5.68434e-14l0,-260.501l96,0l0,260.501l260.501,0l0,96l-260.501,0Z</Geometry>
        <Geometry x:Key="AddGroupGeometry">M265.81,677.779L85.81,677.779L85.81,497.779L135.81,497.779L135.81,627.779L265.81,627.779L265.81,677.779ZM502.19,677.779L682.19,677.779L682.19,497.779L632.19,497.779L632.19,627.779L502.19,627.779L502.19,677.779ZM413.734,354.266L578.025,354.266L578.025,413.734L413.734,413.734L413.734,578.025L354.266,578.025L354.266,413.734L189.975,413.734L189.975,354.266L354.266,354.266L354.266,189.975L413.734,189.975L413.734,354.266ZM502.19,90.221L682.19,90.221L682.19,270.221L632.19,270.221L632.19,140.221L502.19,140.221L502.19,90.221ZM265.81,90.221L85.81,90.221L85.81,270.221L135.81,270.221L135.81,140.221L265.81,140.221L265.81,90.221Z</Geometry>
        <Geometry x:Key="DeleteGeometry">M453.423,396.115L676.033,618.725L618.721,676.037L396.111,453.427L173.501,676.037L116.188,618.725L338.798,396.115L116.188,173.505L173.501,116.193L396.111,338.803L618.721,116.193L676.033,173.505L453.423,396.115Z</Geometry>

        <Style x:Key="RowDefinition3Style" TargetType="{x:Type RowDefinition}">
            <Setter Property="Height" Value="1.5*" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding AllowLivePreview}" Value="False">
                    <Setter Property="Height" Value="Auto" />
                </DataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding AllowLivePreview}" Value="True" />
                        <Condition Binding="{Binding EnableLivePreview}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Height" Value="Auto" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="dataGridContainerStyle" TargetType="{x:Type Grid}">
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding AllowLivePreview}" Value="True" />
                        <Condition Binding="{Binding EnableLivePreview}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility" Value="Collapsed" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="gridSpliterStyle" TargetType="{x:Type GridSplitter}">
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding AllowLivePreview}" Value="True" />
                        <Condition Binding="{Binding EnableLivePreview}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility" Value="Collapsed" />
                </MultiDataTrigger>
                <DataTrigger Binding="{Binding AllowLivePreview}" Value="False">
                    <Setter Property="Visibility" Value="Collapsed" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    
    <Grid Margin="6 6 6 0">
        <i:Interaction.Behaviors>
            <!-- Fix for SA-144 -->
            <catel:Focus FocusDelay="1000" FocusMoment="Loaded" />
        </i:Interaction.Behaviors>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Style="{StaticResource RowDefinition3Style}"/>
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <TextBlock Grid.Column="0" Text="Name:" />
        <TextBox Grid.Column="1" Height="26" Margin="4 2 4 2"
                 Text="{Binding FilterSchemeTitle, NotifyOnValidationError=True, ValidatesOnDataErrors=True}">
            <i:Interaction.Behaviors>
                <catel:UpdateBindingOnTextChanged UpdateDelay="0" />
            </i:Interaction.Behaviors>
        </TextBox>
        <ToggleButton Grid.Row="0" Grid.Column="2" Height="26" Padding="4 0 4 0"
                      IsChecked="{Binding EnableLivePreview}" Content="Live Preview" Margin="2 4 2 4"
                      Visibility="{Binding AllowLivePreview, Converter={catel:BooleanToCollapsingVisibilityConverter}}" />

        <TreeView Grid.Row="1" Grid.ColumnSpan="3" BorderThickness="1" BorderBrush="Transparent"
                  ItemsSource="{Binding FilterScheme.ConditionItems}">
            <i:Interaction.Behaviors>
                <behaviors:DisableSelectionInTreeView />
            </i:Interaction.Behaviors>
            
            <TreeView.Resources>
                <Style TargetType="DatePicker">
                    <Setter Property="Width" Value="120" />
                    <Setter Property="Margin" Value="2" />
                    <Setter Property="Height" Value="26" />
                </Style>

                <Style TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
                    <Setter Property="Width" Value="120" />
                    <Setter Property="Height" Value="26" />
                    <Setter Property="Margin" Value="2" />
                </Style>

                <Style TargetType="TextBox">
                    <Setter Property="Width" Value="120" />
                    <Setter Property="MinWidth" Value="120" />
                    <Setter Property="Margin" Value="2" />
                    <Setter Property="VerticalContentAlignment" Value="Center" />
                </Style>
               
            </TreeView.Resources>

            <TreeView.ItemContainerStyle>
                <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource TreeViewItemStyle}"/>
            </TreeView.ItemContainerStyle>

            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate ItemsSource="{Binding Items}">
                    <Grid HorizontalAlignment="Stretch" Background="Transparent">
                        <StackPanel Orientation="Horizontal" Margin="0"
                                    Visibility="{Binding Converter={StaticResource ConditionTreeItemConverter}, ConverterParameter=Group}">
                            <ComboBox ItemsSource="{markup:EnumBinding {x:Type net40:ConditionGroupType}}" SelectedItem="{Binding Type}" />

                            <Button ToolTip="Add expression" Style="{StaticResource IconButtonStyle}" Content="{StaticResource AddGeometry}" 
                                    Command="{Binding DataContext.AddExpressionCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                    CommandParameter="{Binding}">
                            </Button>

                            <Button ToolTip="Add group" Style="{StaticResource IconButtonStyle}" Content="{StaticResource AddGroupGeometry}" 
                                    Command="{Binding DataContext.AddGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                    CommandParameter="{Binding}">
                            </Button>

                            <Button ToolTip="Delete item" Style="{StaticResource IconButtonStyle}" Content="{StaticResource DeleteGeometry}" Padding="3"
                                    Command="{Binding DataContext.DeleteConditionItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                    CommandParameter="{Binding}"
                                    Visibility="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled, Converter={catel:BooleanToCollapsingVisibilityConverter}}">
                            </Button>
                        </StackPanel>

                        <StackPanel Orientation="Horizontal" Margin="0"
                                    Visibility="{Binding Converter={StaticResource ConditionTreeItemConverter}, ConverterParameter=Expression}">
                            <ComboBox ItemsSource="{Binding DataContext.InstanceProperties, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                      DisplayMemberPath="DisplayName" SelectedItem="{Binding Property}" />

                            <ComboBox ItemsSource="{Binding DataTypeExpression, Converter={converters:DataTypeExpressionToConditionsConverter}}"
                                      SelectedItem="{Binding DataTypeExpression.SelectedCondition}" />

                            <Grid Visibility="{Binding DataTypeExpression.IsValueRequired, Converter={StaticResource VisibilityConverter}}"
                                  Margin="0">
                                <TextBox Text="{Binding DataTypeExpression.Value}"
                                         Visibility="{Binding DataTypeExpression.ValueControlType, Converter={StaticResource ValueControlTypeVisibilityConverter}, ConverterParameter={x:Static net40:ValueControlType.Text}}">
                                    <i:Interaction.Behaviors>
                                        <catel:UpdateBindingOnTextChanged UpdateDelay="500" />
                                        <!--<catel:AutoCompletion PropertyName="{Binding Property.Name, Mode=OneWay}" ItemsSource="{Binding DataContext.RawCollection, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}" 
                                                              IsEnabled="{Binding DataContext.EnableAutoCompletion, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"/>-->
                                    </i:Interaction.Behaviors>
                                </TextBox>

                                <DatePicker SelectedDate="{Binding DataTypeExpression.Value}"
                                            Visibility="{Binding DataTypeExpression.ValueControlType, Converter={StaticResource ValueControlTypeVisibilityConverter}, ConverterParameter={x:Static net40:ValueControlType.DateTime}}"/>

                                <ComboBox ItemsSource="{Binding DataTypeExpression.BooleanValues}"
                                          SelectedValue="{Binding DataTypeExpression.Value}"
                                          Visibility="{Binding DataTypeExpression.ValueControlType, Converter={StaticResource ValueControlTypeVisibilityConverter}, ConverterParameter={x:Static net40:ValueControlType.Boolean}}"/>

                                <StackPanel Orientation="Horizontal" Visibility="{Binding DataTypeExpression.ValueControlType, Converter={StaticResource ValueControlTypeVisibilityConverter}, ConverterParameter={x:Static net40:ValueControlType.TimeSpan}}">
                                    <ComboBox ItemsSource="{Binding DataTypeExpression.SpanTypes}" SelectedValue="{Binding DataTypeExpression.SelectedSpanType}" />
                                    <TextBox Text="{Binding DataTypeExpression.Amount}" />
                                </StackPanel>
                            </Grid>

                            <Button ToolTip="Delete item" Style="{StaticResource IconButtonStyle}" Content="{StaticResource DeleteGeometry}"
                                    Command="{Binding DataContext.DeleteConditionItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                    CommandParameter="{Binding}">
                            </Button>
                        </StackPanel>
                    </Grid>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
        </TreeView>

        <GridSplitter x:Name="gridSplitter" Grid.Row="2" Grid.ColumnSpan="3" MinHeight="1" VerticalAlignment="Center" Background="LightGray"
                      HorizontalAlignment="Stretch" Style="{StaticResource gridSpliterStyle}"/>

        <Grid x:Name="dataGridContainer" Grid.Row="3" Grid.ColumnSpan="3" Style="{StaticResource dataGridContainerStyle}">
            <DataGrid x:Name="dataGrid" Margin="0" BorderThickness="1 0 1 1" BorderBrush="LightGray"
                      AutoGenerateColumns="False" ItemsSource="{Binding PreviewItems}"
                      Visibility="{Binding AllowLivePreview, Converter={catel:BooleanToCollapsingVisibilityConverter}}">
            </DataGrid>
        </Grid><commit_msg>ORCOMP-148 Removes redundant grid splitter<commit_after>﻿<catel:DataWindow x:Class="Orc.FilterBuilder.Views.EditFilterWindow"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:net40="clr-namespace:Orc.FilterBuilder"
                  xmlns:converters="clr-namespace:Orc.FilterBuilder.Converters"
                  xmlns:catel="http://catel.codeplex.com"
                  xmlns:markup="clr-namespace:Orc.FilterBuilder.Markup"
                  xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                  xmlns:behaviors="clr-namespace:Orc.FilterBuilder.Behaviors"
                  SizeToContent="Manual" ResizeMode="CanResizeWithGrip">

    <Window.Resources>
        <converters:ConditionTreeItemConverter x:Key="ConditionTreeItemConverter" />
        <BooleanToVisibilityConverter x:Key="VisibilityConverter"/>
        <converters:ValueControlTypeVisibilityConverter x:Key="ValueControlTypeVisibilityConverter"/>

        <Geometry x:Key="AddGeometry">M431.704,432l0,260.501l-96,0l0,-260.501l-260.501,-5.68434e-14l1.42109e-14,-96l260.501,5.68434e-14l0,-260.501l96,0l0,260.501l260.501,0l0,96l-260.501,0Z</Geometry>
        <Geometry x:Key="AddGroupGeometry">M265.81,677.779L85.81,677.779L85.81,497.779L135.81,497.779L135.81,627.779L265.81,627.779L265.81,677.779ZM502.19,677.779L682.19,677.779L682.19,497.779L632.19,497.779L632.19,627.779L502.19,627.779L502.19,677.779ZM413.734,354.266L578.025,354.266L578.025,413.734L413.734,413.734L413.734,578.025L354.266,578.025L354.266,413.734L189.975,413.734L189.975,354.266L354.266,354.266L354.266,189.975L413.734,189.975L413.734,354.266ZM502.19,90.221L682.19,90.221L682.19,270.221L632.19,270.221L632.19,140.221L502.19,140.221L502.19,90.221ZM265.81,90.221L85.81,90.221L85.81,270.221L135.81,270.221L135.81,140.221L265.81,140.221L265.81,90.221Z</Geometry>
        <Geometry x:Key="DeleteGeometry">M453.423,396.115L676.033,618.725L618.721,676.037L396.111,453.427L173.501,676.037L116.188,618.725L338.798,396.115L116.188,173.505L173.501,116.193L396.111,338.803L618.721,116.193L676.033,173.505L453.423,396.115Z</Geometry>

        <Style x:Key="RowDefinition3Style" TargetType="{x:Type RowDefinition}">
            <Setter Property="Height" Value="1.5*" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding AllowLivePreview}" Value="False">
                    <Setter Property="Height" Value="Auto" />
                </DataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding AllowLivePreview}" Value="True" />
                        <Condition Binding="{Binding EnableLivePreview}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Height" Value="Auto" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="dataGridContainerStyle" TargetType="{x:Type Grid}">
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding AllowLivePreview}" Value="True" />
                        <Condition Binding="{Binding EnableLivePreview}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility" Value="Collapsed" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    
    <Grid Margin="6 6 6 0">
        <i:Interaction.Behaviors>
            <!-- Fix for SA-144 -->
            <catel:Focus FocusDelay="1000" FocusMoment="Loaded" />
        </i:Interaction.Behaviors>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Style="{StaticResource RowDefinition3Style}"/>
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <TextBlock Grid.Column="0" Text="Name:" />
        <TextBox Grid.Column="1" Height="26" Margin="4 2 4 2"
                 Text="{Binding FilterSchemeTitle, NotifyOnValidationError=True, ValidatesOnDataErrors=True}">
            <i:Interaction.Behaviors>
                <catel:UpdateBindingOnTextChanged UpdateDelay="0" />
            </i:Interaction.Behaviors>
        </TextBox>
        <ToggleButton Grid.Row="0" Grid.Column="2" Height="26" Padding="4 0 4 0"
                      IsChecked="{Binding EnableLivePreview}" Content="Live Preview" Margin="2 4 2 4"
                      Visibility="{Binding AllowLivePreview, Converter={catel:BooleanToCollapsingVisibilityConverter}}" />

        <TreeView Grid.Row="1" Grid.ColumnSpan="3" BorderThickness="1" BorderBrush="Transparent"
                  ItemsSource="{Binding FilterScheme.ConditionItems}">
            <i:Interaction.Behaviors>
                <behaviors:DisableSelectionInTreeView />
            </i:Interaction.Behaviors>
            
            <TreeView.Resources>
                <Style TargetType="DatePicker">
                    <Setter Property="Width" Value="120" />
                    <Setter Property="Margin" Value="2" />
                    <Setter Property="Height" Value="26" />
                </Style>

                <Style TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
                    <Setter Property="Width" Value="120" />
                    <Setter Property="Height" Value="26" />
                    <Setter Property="Margin" Value="2" />
                </Style>

                <Style TargetType="TextBox">
                    <Setter Property="Width" Value="120" />
                    <Setter Property="MinWidth" Value="120" />
                    <Setter Property="Margin" Value="2" />
                    <Setter Property="VerticalContentAlignment" Value="Center" />
                </Style>
               
            </TreeView.Resources>

            <TreeView.ItemContainerStyle>
                <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource TreeViewItemStyle}"/>
            </TreeView.ItemContainerStyle>

            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate ItemsSource="{Binding Items}">
                    <Grid HorizontalAlignment="Stretch" Background="Transparent">
                        <StackPanel Orientation="Horizontal" Margin="0"
                                    Visibility="{Binding Converter={StaticResource ConditionTreeItemConverter}, ConverterParameter=Group}">
                            <ComboBox ItemsSource="{markup:EnumBinding {x:Type net40:ConditionGroupType}}" SelectedItem="{Binding Type}" />

                            <Button ToolTip="Add expression" Style="{StaticResource IconButtonStyle}" Content="{StaticResource AddGeometry}" 
                                    Command="{Binding DataContext.AddExpressionCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                    CommandParameter="{Binding}">
                            </Button>

                            <Button ToolTip="Add group" Style="{StaticResource IconButtonStyle}" Content="{StaticResource AddGroupGeometry}" 
                                    Command="{Binding DataContext.AddGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                    CommandParameter="{Binding}">
                            </Button>

                            <Button ToolTip="Delete item" Style="{StaticResource IconButtonStyle}" Content="{StaticResource DeleteGeometry}" Padding="3"
                                    Command="{Binding DataContext.DeleteConditionItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                    CommandParameter="{Binding}"
                                    Visibility="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled, Converter={catel:BooleanToCollapsingVisibilityConverter}}">
                            </Button>
                        </StackPanel>

                        <StackPanel Orientation="Horizontal" Margin="0"
                                    Visibility="{Binding Converter={StaticResource ConditionTreeItemConverter}, ConverterParameter=Expression}">
                            <ComboBox ItemsSource="{Binding DataContext.InstanceProperties, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                      DisplayMemberPath="DisplayName" SelectedItem="{Binding Property}" />

                            <ComboBox ItemsSource="{Binding DataTypeExpression, Converter={converters:DataTypeExpressionToConditionsConverter}}"
                                      SelectedItem="{Binding DataTypeExpression.SelectedCondition}" />

                            <Grid Visibility="{Binding DataTypeExpression.IsValueRequired, Converter={StaticResource VisibilityConverter}}"
                                  Margin="0">
                                <TextBox Text="{Binding DataTypeExpression.Value}"
                                         Visibility="{Binding DataTypeExpression.ValueControlType, Converter={StaticResource ValueControlTypeVisibilityConverter}, ConverterParameter={x:Static net40:ValueControlType.Text}}">
                                    <i:Interaction.Behaviors>
                                        <catel:UpdateBindingOnTextChanged UpdateDelay="500" />
                                        <!--<catel:AutoCompletion PropertyName="{Binding Property.Name, Mode=OneWay}" ItemsSource="{Binding DataContext.RawCollection, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}" 
                                                              IsEnabled="{Binding DataContext.EnableAutoCompletion, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"/>-->
                                    </i:Interaction.Behaviors>
                                </TextBox>

                                <DatePicker SelectedDate="{Binding DataTypeExpression.Value}"
                                            Visibility="{Binding DataTypeExpression.ValueControlType, Converter={StaticResource ValueControlTypeVisibilityConverter}, ConverterParameter={x:Static net40:ValueControlType.DateTime}}"/>

                                <ComboBox ItemsSource="{Binding DataTypeExpression.BooleanValues}"
                                          SelectedValue="{Binding DataTypeExpression.Value}"
                                          Visibility="{Binding DataTypeExpression.ValueControlType, Converter={StaticResource ValueControlTypeVisibilityConverter}, ConverterParameter={x:Static net40:ValueControlType.Boolean}}"/>

                                <StackPanel Orientation="Horizontal" Visibility="{Binding DataTypeExpression.ValueControlType, Converter={StaticResource ValueControlTypeVisibilityConverter}, ConverterParameter={x:Static net40:ValueControlType.TimeSpan}}">
                                    <ComboBox ItemsSource="{Binding DataTypeExpression.SpanTypes}" SelectedValue="{Binding DataTypeExpression.SelectedSpanType}" />
                                    <TextBox Text="{Binding DataTypeExpression.Amount}" />
                                </StackPanel>
                            </Grid>

                            <Button ToolTip="Delete item" Style="{StaticResource IconButtonStyle}" Content="{StaticResource DeleteGeometry}"
                                    Command="{Binding DataContext.DeleteConditionItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
                                    CommandParameter="{Binding}">
                            </Button>
                        </StackPanel>
                    </Grid>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
        </TreeView>

        <Grid x:Name="dataGridContainer" Grid.Row="2" Grid.ColumnSpan="3" Style="{StaticResource dataGridContainerStyle}">
            <DataGrid x:Name="dataGrid" Margin="0" BorderThickness="1" BorderBrush="LightGray"
                      AutoGenerateColumns="False" ItemsSource="{Binding PreviewItems}"
                      Visibility="{Binding AllowLivePreview, Converter={catel:BooleanToCollapsingVisibilityConverter}}">
            </DataGrid>
        </Grid>
{'fraction_non_alphanumeric': 0.11372830730840486, 'fraction_numerical': 0.06090967522401603, 'mean_word_length': 2.1806156806156807, 'pattern_counts': {'":': 0, '<': 271, '<?xml version=': 0, '>': 271, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 60, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4266421', 'n_tokens_mistral': 7879, 'n_tokens_neox': 6405, 'n_words': 870}