<commit_before>﻿<TabItem x:Class="Netgun.Controls.DocumentsTab"
             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:netgun="clr-namespace:Netgun.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <TabItem.Resources>
        <CollectionViewSource x:Key="DocumentCollectionViewSource"  CollectionViewType="ListCollectionView"/>
        <DataTemplate x:Key="DocumentRowTemplate">
            <TreeView>
                <TreeViewItem Header="{Binding Raw}" FontFamily="Consolas">
                    <TreeViewItem Header="{Binding Json}" FontFamily="Consolas"/>
                </TreeViewItem>
            </TreeView>
        </DataTemplate>
    </TabItem.Resources>
    <TabItem.Header>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding TabName}"/>
            <Button Click="CloseTab_Click" Margin="4" Width="15" Height="15" Padding="0">X</Button>
        </StackPanel>
    </TabItem.Header>
    <DockPanel>
        <DockPanel DockPanel.Dock="Bottom" Height="200">
            <ToolBar DockPanel.Dock="Top">
                <Button Command="{Binding RunCommand}">Run</Button>
            </ToolBar>
            <WindowsFormsHost Name="WinFormsHost">
                <netgun:Terminal />
            </WindowsFormsHost>
        </DockPanel>
        <DataGrid Name="MainGrid" DataContext="{StaticResource DocumentCollectionViewSource}" ItemsSource="{Binding}" AutoGenerateColumns="False" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="Document" CellTemplate="{StaticResource DocumentRowTemplate}"/>
            </DataGrid.Columns>
        </DataGrid>
    </DockPanel>
</TabItem><commit_msg>Switch main datagrid to pixel-scrolling #2<commit_after>﻿<TabItem x:Class="Netgun.Controls.DocumentsTab"
             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:netgun="clr-namespace:Netgun.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <TabItem.Resources>
        <CollectionViewSource x:Key="DocumentCollectionViewSource"  CollectionViewType="ListCollectionView"/>
        <DataTemplate x:Key="DocumentRowTemplate">
            <TreeView>
                <TreeViewItem Header="{Binding Raw}" FontFamily="Consolas">
                    <TreeViewItem Header="{Binding Json}" FontFamily="Consolas"/>
                </TreeViewItem>
            </TreeView>
        </DataTemplate>
    </TabItem.Resources>
    <TabItem.Header>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding TabName}"/>
            <Button Click="CloseTab_Click" Margin="4" Width="15" Height="15" Padding="0">X</Button>
        </StackPanel>
    </TabItem.Header>
    <DockPanel>
        <DockPanel DockPanel.Dock="Bottom" Height="200">
            <ToolBar DockPanel.Dock="Top">
                <Button Command="{Binding RunCommand}">Run</Button>
            </ToolBar>
            <WindowsFormsHost Name="WinFormsHost">
                <netgun:Terminal />
            </WindowsFormsHost>
        </DockPanel>
        <DataGrid Name="MainGrid" DataContext="{StaticResource DocumentCollectionViewSource}" ItemsSource="{Binding}"  AutoGenerateColumns="False" IsReadOnly="True" VirtualizingStackPanel.ScrollUnit="Pixel">
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="Document" CellTemplate="{StaticResource DocumentRowTemplate}"/>
            </DataGrid.Columns>
        </DataGrid>
    </DockPanel>
</TabItem>
{'fraction_non_alphanumeric': 0.13454903893543618, 'fraction_numerical': 0.015524889107934944, 'mean_word_length': 2.6833030852994555, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '3496778', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1097, 'n_words': 153}