<commit_before>﻿<UserControl x:Class="Wox.ResultPanel"
             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:wox="clr-namespace:Wox"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <wox:ImagePathConverter x:Key="ImagePathConverter"/>
    </UserControl.Resources>

    <Grid x:Name="gridContainer">
        <ListBox x:Name="lbResults" PreviewMouseDown="LbResults_OnPreviewMouseDown" Style="{DynamicResource BaseListboxStyle}" SelectionChanged ="lbResults_SelectionChanged"  Focusable="False"  KeyboardNavigation.DirectionalNavigation="Cycle" SelectionMode="Single" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling">
            <ListBox.Resources>
                <!--SelectedItem with focus-->
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{DynamicResource ItemSelectedBackgroundColor}"/>
                <!--SelectedItem without focus-->
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{DynamicResource ItemSelectedBackgroundColor}"/>
            </ListBox.Resources>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid HorizontalAlignment="Stretch" Height="40" VerticalAlignment="Stretch" Margin="5"  Cursor="Hand">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="32"></ColumnDefinition>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Image x:Name="imgIco" Width="32" Height="32" HorizontalAlignment="Left" >
                            <Image.Source>
                                <MultiBinding Converter="{StaticResource ImagePathConverter}">
                                    <MultiBinding.Bindings>
                                        <Binding Path="IcoPath" />
                                        <Binding Path="PluginDirectory" />
                                    </MultiBinding.Bindings>
                                </MultiBinding>
                            </Image.Source>
                        </Image>
                        <Grid Margin="5 0 5 0" Grid.Column="1" HorizontalAlignment="Stretch">
                            <Grid.RowDefinitions>
                                <RowDefinition></RowDefinition>
                                <RowDefinition Height="Auto" x:Name="SubTitleRowDefinition"></RowDefinition>
                            </Grid.RowDefinitions>
                            <TextBlock Style="{DynamicResource ItemTitleStyle}" VerticalAlignment="Center" ToolTip="{Binding Title}" x:Name="tbTitle" Text="{Binding Title}"></TextBlock>
                            <TextBlock Style="{DynamicResource ItemSubTitleStyle}" ToolTip="{Binding SubTitle}" Visibility="{Binding SubTitle, Converter={wox:StringNullOrEmptyToVisibilityConverter}}" Grid.Row="1" x:Name="tbSubTitle" Text="{Binding SubTitle}"></TextBlock>
                        </Grid>
                    </Grid>
                    <DataTemplate.Triggers>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
                            <Setter TargetName="tbTitle" Property="Style" Value="{DynamicResource ItemTitleSelectedStyle}"/>
                            <Setter TargetName="tbSubTitle" Property="Style" Value="{DynamicResource ItemSubTitleSelectedStyle}"/>
                        </DataTrigger>
                    </DataTemplate.Triggers>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl><commit_msg>close #38 Change Virtualizing Mode from Recycling to Standard.<commit_after>﻿<UserControl x:Class="Wox.ResultPanel"
             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:wox="clr-namespace:Wox"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <wox:ImagePathConverter x:Key="ImagePathConverter"/>
    </UserControl.Resources>

    <Grid x:Name="gridContainer">
        <ListBox x:Name="lbResults" PreviewMouseDown="LbResults_OnPreviewMouseDown" Style="{DynamicResource BaseListboxStyle}" SelectionChanged ="lbResults_SelectionChanged"  Focusable="False"  KeyboardNavigation.DirectionalNavigation="Cycle" SelectionMode="Single" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Standard">
            <ListBox.Resources>
                <!--SelectedItem with focus-->
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{DynamicResource ItemSelectedBackgroundColor}"/>
                <!--SelectedItem without focus-->
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{DynamicResource ItemSelectedBackgroundColor}"/>
            </ListBox.Resources>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid HorizontalAlignment="Stretch" Height="40" VerticalAlignment="Stretch" Margin="5"  Cursor="Hand">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="32"></ColumnDefinition>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Image x:Name="imgIco" Width="32" Height="32" HorizontalAlignment="Left" >
                            <Image.Source>
                                <MultiBinding Converter="{StaticResource ImagePathConverter}">
                                    <MultiBinding.Bindings>
                                        <Binding Path="IcoPath" />
                                        <Binding Path="PluginDirectory" />
                                    </MultiBinding.Bindings>
                                </MultiBinding>
                            </Image.Source>
                        </Image>
                        <Grid Margin="5 0 5 0" Grid.Column="1" HorizontalAlignment="Stretch">
                            <Grid.RowDefinitions>
                                <RowDefinition></RowDefinition>
                                <RowDefinition Height="Auto" x:Name="SubTitleRowDefinition"></RowDefinition>
                            </Grid.RowDefinitions>
                            <TextBlock Style="{DynamicResource ItemTitleStyle}" VerticalAlignment="Center" ToolTip="{Binding Title}" x:Name="tbTitle" Text="{Binding Title}"></TextBlock>
                            <TextBlock Style="{DynamicResource ItemSubTitleStyle}" ToolTip="{Binding SubTitle}" Visibility="{Binding SubTitle, Converter={wox:StringNullOrEmptyToVisibilityConverter}}" Grid.Row="1" x:Name="tbSubTitle" Text="{Binding SubTitle}"></TextBlock>
                        </Grid>
                    </Grid>
                    <DataTemplate.Triggers>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
                            <Setter TargetName="tbTitle" Property="Style" Value="{DynamicResource ItemTitleSelectedStyle}"/>
                            <Setter TargetName="tbSubTitle" Property="Style" Value="{DynamicResource ItemSubTitleSelectedStyle}"/>
                        </DataTrigger>
                    </DataTemplate.Triggers>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
{'fraction_non_alphanumeric': 0.11361963190184049, 'fraction_numerical': 0.009325153374233128, 'mean_word_length': 2.0211267605633805, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 111, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6918222', 'n_tokens_mistral': 2049, 'n_tokens_neox': 1855, 'n_words': 285}