<commit_before>﻿<UserControl x:Class="PsISEProjectExplorer.ProjectExplorerWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:viewModel="clr-namespace:PsISEProjectExplorer.UI.ViewModel"
             xmlns:uiHelpers="clr-namespace:PsISEProjectExplorer.UI.Helpers"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
            <uiHelpers:EmptyListToVisibilityConverter x:Key="EmptyListToVisibilityConverter"/>
            <DataTemplate x:Key="StandardTemplate">
                <StackPanel Orientation="Horizontal" ToolTip="{Binding Path=Tooltip}">
                    <Image Source="{Binding Path=Image}" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                    <TextBlock Text="{Binding Path=Name}" Margin="5,0,0,0" />
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Key="EditTemplate">
                <StackPanel Orientation="Horizontal">
                    <Image Source="{Binding Path=Image}" RenderOptions.BitmapScalingMode="NearestNeighbor" />
                    <TextBox Name="EditItemTextBox" Text="{Binding Path=Name, UpdateSourceTrigger=Explicit, Mode=OneWay}" Margin="5,0,0,0" LostFocus="SearchResults_EndEdit"
                             uiHelpers:FocusExtensions.IsDefaultFocusElement="True" KeyDown="SearchResults_EditKeyDown"/>
                </StackPanel>
            </DataTemplate>
        </ResourceDictionary>

    </UserControl.Resources>
    <Grid d:DataContext="{d:DesignInstance viewModel:MainViewModel}">
        <TextBlock HorizontalAlignment="Left" Margin="10,5,0,0" TextWrapping="NoWrap" Text="Workspace:" VerticalAlignment="Top"
                   Visibility="{Binding Path=WorkspaceDirectoryModel.WorkspaceDirectories, Converter={StaticResource EmptyListToVisibilityConverter}}" />
        <ComboBox HorizontalAlignment="Stretch" Margin="72,1,66,0" ItemsSource="{Binding Path=WorkspaceDirectoryModel.WorkspaceDirectories}"
                  SelectedValue="{Binding Path=WorkspaceDirectoryModel.CurrentWorkspaceDirectory}" VerticalAlignment="Top" MaxDropDownHeight="Auto"
                  Visibility="{Binding Path=WorkspaceDirectoryModel.WorkspaceDirectories, Converter={StaticResource EmptyListToVisibilityConverter}}" />
        <TextBlock HorizontalAlignment="Stretch" Margin="10,5,66,0" Text="[Please open a Powershell file or click 'Change' button]"
                  VerticalAlignment="Top"
                  Visibility="{Binding Path=WorkspaceDirectoryModel.WorkspaceDirectories, Converter={StaticResource EmptyListToVisibilityConverter}, ConverterParameter=VisibleOnEmpty}"/>
        <Button Content="Change" HorizontalAlignment="Right" Margin="0,1,10,0" VerticalAlignment="Top" Width="51" Click="ChangeWorkspace_Click"/>
        <TextBox Name="TextBoxSearchText" HorizontalAlignment="Stretch" Height="21" Margin="10,25,36,0" TextWrapping="Wrap" VerticalAlignment="Top" Text="{Binding Path=SearchText, UpdateSourceTrigger=PropertyChanged, Delay=150}" MaxLength="100"
                 x:FieldModifier="private" />
        <Button VerticalAlignment="Top" Height="21" Margin="10,25,10,0" HorizontalAlignment="Right" Click="TextBoxSearchClear_Click" Background="{DynamicResource {x:Static SystemColors.WindowBrush}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowBrush}}">
            <Image Source="Resources/cancel.png" ToolTip="Clear search text" />
        </Button>
        <ToolBarTray Height="32" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,48,-4,0" IsLocked="True" Background="{DynamicResource {x:Static SystemColors.WindowBrush}}">
            <uiHelpers:LockedToolBar x:Name="ButtonToolbar" AllowDrop="False" Background="{DynamicResource {x:Static SystemColors.WindowBrush}}">
                <ToggleButton IsChecked="{Binding Path=SearchRegex}">
                    <Image Source="Resources\toolbar_searchRegex.png" ToolTip="Search using Regex" />
                </ToggleButton>
                <ToggleButton IsChecked="{Binding Path=SearchInFiles}">
                    <Image Source="Resources\toolbar_searchInFiles.png" ToolTip="Search in Files" />
                </ToggleButton>
                <ToggleButton IsChecked="{Binding Path=ShowAllFiles}">
                    <Image Source="Resources\toolbar_showAllFiles.png" ToolTip="Show All Files" />
                </ToggleButton>
                <ToggleButton IsChecked="{Binding Path=SyncWithActiveDocument}">
                    <Image Source="Resources\toolbar_sync.png" ToolTip="Sync with Active Document"/>
                </ToggleButton>
                <Button Click="RefreshDirectoryStructure_Click">
                    <Image Source="Resources\toolbar_refresh.png" ToolTip="Refresh Directory Structure" />
                </Button>
                <Button Click="CollapseAll_Click" >
                    <Image Source="Resources\toolbar_toggle_collapse.png" ToolTip="Collapse All" />
                </Button>
                <ToggleButton IsChecked="{Binding Path=WorkspaceDirectoryModel.AutoUpdateRootDirectory}">
                    <Image Source="Resources\toolbar_autoUpdateProjectDir.png" ToolTip="Auto-update Workspace Directory"/>
                </ToggleButton>
            </uiHelpers:LockedToolBar>
        </ToolBarTray>
        <TextBlock HorizontalAlignment="Left" Margin="10,54,0,5" TextWrapping="Wrap" Text="{Binding Path=TreeItemsResultString}" VerticalAlignment="Top" />

        <uiHelpers:StretchingTreeView x:Name="SearchResults" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,75,10,10" ItemsSource="{Binding Path=TreeViewModel.TreeViewItems}" PreviewMouseLeftButtonDown="SearchResults_PreviewMouseLeftButtonDown" PreviewMouseRightButtonDown="SearchResults_PreviewMouseRightButtonDown"
                   x:FieldModifier="private" PreviewMouseMove="SearchResults_PreviewMouseMove" Drop="SearchResults_Drop" DragEnter="SearchResults_DragEnter" AllowDrop="True" KeyDown="SearchResults_KeyDown" PreviewKeyDown="SearchResults_PreviewKeyDown"
                   Visibility="{Binding Path=TreeViewModel.TreeViewItems, Converter={StaticResource EmptyListToVisibilityConverter}}" MouseRightButtonUp="SearchResults_MouseRightButtonUp">

            <TreeView.Resources>
                <ContextMenu x:Key="DirectoryContext">
                    <MenuItem Header="Open in Explorer" Click="SearchResults_OpenInExplorer">
                        <MenuItem.Icon>
                            <Image Source="Resources/node_directory.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <Separator />
                    <MenuItem Header="Add">
                        <MenuItem.Icon>
                            <Image Source="Resources/add.png" />
                        </MenuItem.Icon>
                        <MenuItem Header="Directory" Click="SearchResults_AddDirectory">
                            <MenuItem.Icon>
                                <Image Source="Resources/node_directory.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <MenuItem Header="File" Click="SearchResults_AddFile">
                            <MenuItem.Icon>
                                <Image Source="Resources/node_file.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                    </MenuItem>
                    <MenuItem Header="Include" Click="SearchResults_ExcludeOrInclude" InputGestureText="F8">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_include.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Exclude" Click="SearchResults_ExcludeOrInclude" InputGestureText="F8">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_exclude.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Rename" Click="SearchResults_Rename" InputGestureText="F2" >
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_rename.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Delete" Click="SearchResults_Delete" InputGestureText="Del">
                        <MenuItem.Icon>
                            <Image Source="Resources/cross.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                </ContextMenu>
                <ContextMenu x:Key="FileContext">
                    <MenuItem Header="Open in Explorer" Click="SearchResults_OpenInExplorer">
                        <MenuItem.Icon>
                            <Image Source="Resources/node_directory.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <Separator />
                    <MenuItem Header="Include" Click="SearchResults_ExcludeOrInclude" InputGestureText="F8">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_include.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Exclude" Click="SearchResults_ExcludeOrInclude" InputGestureText="F8">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_exclude.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Rename" Click="SearchResults_Rename" InputGestureText="F2">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_rename.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Delete" Click="SearchResults_Delete" InputGestureText="Del">
                        <MenuItem.Icon>
                            <Image Source="Resources/cross.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                </ContextMenu>
                <ContextMenu x:Key="EmptyContext">
                    <MenuItem Header="Add">
                        <MenuItem.Icon>
                            <Image Source="Resources/add.png" />
                        </MenuItem.Icon>
                        <MenuItem Header="Directory" Click="SearchResults_AddDirectory">
                            <MenuItem.Icon>
                                <Image Source="Resources/node_directory.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <MenuItem Header="File" Click="SearchResults_AddFile">
                            <MenuItem.Icon>
                                <Image Source="Resources/node_file.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                    </MenuItem>
                </ContextMenu>
            </TreeView.Resources>

            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate ItemsSource="{Binding Path=Children}" DataType="{x:Type viewModel:TreeViewEntryItemModel}">
                    <ContentPresenter Content="{Binding}">
                        <ContentPresenter.Style>
                            <Style TargetType="{x:Type ContentPresenter}">
                                <Setter Property="ContentTemplate" Value="{StaticResource StandardTemplate}" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsBeingEdited}" Value="True">
                                        <Setter Property="ContentTemplate" Value="{StaticResource EditTemplate}" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </ContentPresenter.Style>
                    </ContentPresenter>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
            <TreeView.ItemContainerStyle>
                <Style TargetType="TreeViewItem">
                    <Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}" />
                    <Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}" />
                    <Setter Property="FontWeight" Value="Normal" />
                    <Style.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsSelectionActive" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="FontWeight" Value="Bold" />
                        </MultiTrigger>
                        <DataTrigger Binding="{Binding Path=IsExcluded}" Value="True">
                            <Setter Property="Opacity" Value="0.5" />
                        </DataTrigger>
                        <Trigger Property="uiHelpers:TreeViewMouseHelper.IsMouseDirectlyOverItem" Value="True">
                            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.MenuBrushKey}}" />
                        </Trigger>
                        <Trigger Property="uiHelpers:TreeViewDropHighlighter.IsPossibleDropTarget" Value="True">
                            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.MenuHighlightBrushKey}}" />
                            <Setter Property="FontWeight" Value="Bold" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </TreeView.ItemContainerStyle>
        </uiHelpers:StretchingTreeView>
    </Grid>
</UserControl>
<commit_msg>Showing tree when there is no files (to enable creating new files / cloning from repository).<commit_after>﻿<UserControl x:Class="PsISEProjectExplorer.ProjectExplorerWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:viewModel="clr-namespace:PsISEProjectExplorer.UI.ViewModel"
             xmlns:uiHelpers="clr-namespace:PsISEProjectExplorer.UI.Helpers"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
            <uiHelpers:EmptyListToVisibilityConverter x:Key="EmptyListToVisibilityConverter"/>
            <DataTemplate x:Key="StandardTemplate">
                <StackPanel Orientation="Horizontal" ToolTip="{Binding Path=Tooltip}">
                    <Image Source="{Binding Path=Image}" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                    <TextBlock Text="{Binding Path=Name}" Margin="5,0,0,0" />
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Key="EditTemplate">
                <StackPanel Orientation="Horizontal">
                    <Image Source="{Binding Path=Image}" RenderOptions.BitmapScalingMode="NearestNeighbor" />
                    <TextBox Name="EditItemTextBox" Text="{Binding Path=Name, UpdateSourceTrigger=Explicit, Mode=OneWay}" Margin="5,0,0,0" LostFocus="SearchResults_EndEdit"
                             uiHelpers:FocusExtensions.IsDefaultFocusElement="True" KeyDown="SearchResults_EditKeyDown"/>
                </StackPanel>
            </DataTemplate>
        </ResourceDictionary>

    </UserControl.Resources>
    <Grid d:DataContext="{d:DesignInstance viewModel:MainViewModel}">
        <TextBlock HorizontalAlignment="Left" Margin="10,5,0,0" TextWrapping="NoWrap" Text="Workspace:" VerticalAlignment="Top"
                   Visibility="{Binding Path=WorkspaceDirectoryModel.WorkspaceDirectories, Converter={StaticResource EmptyListToVisibilityConverter}}" />
        <ComboBox HorizontalAlignment="Stretch" Margin="72,1,66,0" ItemsSource="{Binding Path=WorkspaceDirectoryModel.WorkspaceDirectories}"
                  SelectedValue="{Binding Path=WorkspaceDirectoryModel.CurrentWorkspaceDirectory}" VerticalAlignment="Top" MaxDropDownHeight="Auto"
                  Visibility="{Binding Path=WorkspaceDirectoryModel.WorkspaceDirectories, Converter={StaticResource EmptyListToVisibilityConverter}}" />
        <TextBlock HorizontalAlignment="Stretch" Margin="10,5,66,0" Text="[Please open a Powershell file or click 'Change' button]"
                  VerticalAlignment="Top"
                  Visibility="{Binding Path=WorkspaceDirectoryModel.WorkspaceDirectories, Converter={StaticResource EmptyListToVisibilityConverter}, ConverterParameter=VisibleOnEmpty}"/>
        <Button Content="Change" HorizontalAlignment="Right" Margin="0,1,10,0" VerticalAlignment="Top" Width="51" Click="ChangeWorkspace_Click"/>
        <TextBox Name="TextBoxSearchText" HorizontalAlignment="Stretch" Height="21" Margin="10,25,36,0" TextWrapping="Wrap" VerticalAlignment="Top" Text="{Binding Path=SearchText, UpdateSourceTrigger=PropertyChanged, Delay=150}" MaxLength="100"
                 x:FieldModifier="private" />
        <Button VerticalAlignment="Top" Height="21" Margin="10,25,10,0" HorizontalAlignment="Right" Click="TextBoxSearchClear_Click" Background="{DynamicResource {x:Static SystemColors.WindowBrush}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowBrush}}">
            <Image Source="Resources/cancel.png" ToolTip="Clear search text" />
        </Button>
        <ToolBarTray Height="32" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,48,-4,0" IsLocked="True" Background="{DynamicResource {x:Static SystemColors.WindowBrush}}">
            <uiHelpers:LockedToolBar x:Name="ButtonToolbar" AllowDrop="False" Background="{DynamicResource {x:Static SystemColors.WindowBrush}}">
                <ToggleButton IsChecked="{Binding Path=SearchRegex}">
                    <Image Source="Resources\toolbar_searchRegex.png" ToolTip="Search using Regex" />
                </ToggleButton>
                <ToggleButton IsChecked="{Binding Path=SearchInFiles}">
                    <Image Source="Resources\toolbar_searchInFiles.png" ToolTip="Search in Files" />
                </ToggleButton>
                <ToggleButton IsChecked="{Binding Path=ShowAllFiles}">
                    <Image Source="Resources\toolbar_showAllFiles.png" ToolTip="Show All Files" />
                </ToggleButton>
                <ToggleButton IsChecked="{Binding Path=SyncWithActiveDocument}">
                    <Image Source="Resources\toolbar_sync.png" ToolTip="Sync with Active Document"/>
                </ToggleButton>
                <Button Click="RefreshDirectoryStructure_Click">
                    <Image Source="Resources\toolbar_refresh.png" ToolTip="Refresh Directory Structure" />
                </Button>
                <Button Click="CollapseAll_Click" >
                    <Image Source="Resources\toolbar_toggle_collapse.png" ToolTip="Collapse All" />
                </Button>
                <ToggleButton IsChecked="{Binding Path=WorkspaceDirectoryModel.AutoUpdateRootDirectory}">
                    <Image Source="Resources\toolbar_autoUpdateProjectDir.png" ToolTip="Auto-update Workspace Directory"/>
                </ToggleButton>
            </uiHelpers:LockedToolBar>
        </ToolBarTray>
        <TextBlock HorizontalAlignment="Left" Margin="10,54,0,5" TextWrapping="Wrap" Text="{Binding Path=TreeItemsResultString}" VerticalAlignment="Top" />

        <uiHelpers:StretchingTreeView x:Name="SearchResults" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,75,10,10" ItemsSource="{Binding Path=TreeViewModel.TreeViewItems}" PreviewMouseLeftButtonDown="SearchResults_PreviewMouseLeftButtonDown" PreviewMouseRightButtonDown="SearchResults_PreviewMouseRightButtonDown"
                   x:FieldModifier="private" PreviewMouseMove="SearchResults_PreviewMouseMove" Drop="SearchResults_Drop" DragEnter="SearchResults_DragEnter" AllowDrop="True" KeyDown="SearchResults_KeyDown" PreviewKeyDown="SearchResults_PreviewKeyDown"
                   MouseRightButtonUp="SearchResults_MouseRightButtonUp">

            <TreeView.Resources>
                <ContextMenu x:Key="DirectoryContext">
                    <MenuItem Header="Open in Explorer" Click="SearchResults_OpenInExplorer">
                        <MenuItem.Icon>
                            <Image Source="Resources/node_directory.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <Separator />
                    <MenuItem Header="Add">
                        <MenuItem.Icon>
                            <Image Source="Resources/add.png" />
                        </MenuItem.Icon>
                        <MenuItem Header="Directory" Click="SearchResults_AddDirectory">
                            <MenuItem.Icon>
                                <Image Source="Resources/node_directory.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <MenuItem Header="File" Click="SearchResults_AddFile">
                            <MenuItem.Icon>
                                <Image Source="Resources/node_file.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                    </MenuItem>
                    <MenuItem Header="Include" Click="SearchResults_ExcludeOrInclude" InputGestureText="F8">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_include.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Exclude" Click="SearchResults_ExcludeOrInclude" InputGestureText="F8">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_exclude.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Rename" Click="SearchResults_Rename" InputGestureText="F2" >
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_rename.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Delete" Click="SearchResults_Delete" InputGestureText="Del">
                        <MenuItem.Icon>
                            <Image Source="Resources/cross.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                </ContextMenu>
                <ContextMenu x:Key="FileContext">
                    <MenuItem Header="Open in Explorer" Click="SearchResults_OpenInExplorer">
                        <MenuItem.Icon>
                            <Image Source="Resources/node_directory.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <Separator />
                    <MenuItem Header="Include" Click="SearchResults_ExcludeOrInclude" InputGestureText="F8">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_include.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Exclude" Click="SearchResults_ExcludeOrInclude" InputGestureText="F8">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_exclude.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Rename" Click="SearchResults_Rename" InputGestureText="F2">
                        <MenuItem.Icon>
                            <Image Source="Resources/textfield_rename.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Delete" Click="SearchResults_Delete" InputGestureText="Del">
                        <MenuItem.Icon>
                            <Image Source="Resources/cross.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                </ContextMenu>
                <ContextMenu x:Key="EmptyContext">
                    <MenuItem Header="Add">
                        <MenuItem.Icon>
                            <Image Source="Resources/add.png" />
                        </MenuItem.Icon>
                        <MenuItem Header="Directory" Click="SearchResults_AddDirectory">
                            <MenuItem.Icon>
                                <Image Source="Resources/node_directory.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <MenuItem Header="File" Click="SearchResults_AddFile">
                            <MenuItem.Icon>
                                <Image Source="Resources/node_file.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                    </MenuItem>
                </ContextMenu>
            </TreeView.Resources>

            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate ItemsSource="{Binding Path=Children}" DataType="{x:Type viewModel:TreeViewEntryItemModel}">
                    <ContentPresenter Content="{Binding}">
                        <ContentPresenter.Style>
                            <Style TargetType="{x:Type ContentPresenter}">
                                <Setter Property="ContentTemplate" Value="{StaticResource StandardTemplate}" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsBeingEdited}" Value="True">
                                        <Setter Property="ContentTemplate" Value="{StaticResource EditTemplate}" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </ContentPresenter.Style>
                    </ContentPresenter>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
            <TreeView.ItemContainerStyle>
                <Style TargetType="TreeViewItem">
                    <Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}" />
                    <Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}" />
                    <Setter Property="FontWeight" Value="Normal" />
                    <Style.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsSelectionActive" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="FontWeight" Value="Bold" />
                        </MultiTrigger>
                        <DataTrigger Binding="{Binding Path=IsExcluded}" Value="True">
                            <Setter Property="Opacity" Value="0.5" />
                        </DataTrigger>
                        <Trigger Property="uiHelpers:TreeViewMouseHelper.IsMouseDirectlyOverItem" Value="True">
                            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.MenuBrushKey}}" />
                        </Trigger>
                        <Trigger Property="uiHelpers:TreeViewDropHighlighter.IsPossibleDropTarget" Value="True">
                            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.MenuHighlightBrushKey}}" />
                            <Setter Property="FontWeight" Value="Bold" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </TreeView.ItemContainerStyle>
        </uiHelpers:StretchingTreeView>
    </Grid>
</UserControl>

{'fraction_non_alphanumeric': 0.10474491371324665, 'fraction_numerical': 0.007342093525920335, 'mean_word_length': 1.8208651891996517, 'pattern_counts': {'":': 0, '<': 383, '<?xml version=': 0, '>': 383, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4930602', 'n_tokens_mistral': 7056, 'n_tokens_neox': 6407, 'n_words': 992}