<commit_before>﻿<UserControl x:Class="StackTraceExplorer.StackTraceExplorerToolWindowControl"
             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:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
             xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
             xmlns:vsShell="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
             xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
             xmlns:stacktraceexplorer="clr-namespace:StackTraceExplorer"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300"
             DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <TabControl ItemsSource="{Binding StackTraces}" x:Name="StackTraceTabs" Background="Transparent">
        <!-- Change ItemTemplate to control content on tabs -->
        <TabControl.ItemTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Stack Trace"/>
                    <imaging:CrispImage Width="10" Height="10" Margin="5,2,0,0" Moniker="{x:Static catalog:KnownMonikers.Close}" MouseDown="CloseButton_MouseDown" />
                </StackPanel>
            </DataTemplate>
        </TabControl.ItemTemplate>
        <!-- Change ContentTemplate to control main content -->
        <TabControl.ContentTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>

                    <StackPanel HorizontalAlignment="Left" Margin="3">
                        <ToggleButton IsChecked="{Binding WordWrap, Mode=TwoWay}">
                            <ToggleButton.Template>
                                <ControlTemplate TargetType="ToggleButton">
                                    <Border x:Name="WrapBorder" BorderBrush="SteelBlue" BorderThickness="0">
                                        <imaging:CrispImage Width="16" Height="16" Moniker="{x:Static catalog:KnownMonikers.WordWrap}" />
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsChecked" Value="False">
                                            <Setter Property="ToolTip" Value="Enable wrapping of words" />
                                            <Setter TargetName="WrapBorder" Property="BorderThickness" Value="0"/>
                                        </Trigger>
                                        <Trigger Property="IsChecked" Value="True">
                                            <Setter Property="ToolTip" Value="Disable wrapping of words" />
                                            <Setter TargetName="WrapBorder" Property="BorderThickness" Value="1"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </ToggleButton.Template>
                        </ToggleButton>
                    </StackPanel>

                    <stacktraceexplorer:StackTraceEditor 
                        x:Name="TextEditor"
                        SyntaxHighlighting="C#"
                        FontFamily="Consolas"
                        FontSize="10pt"
                        WordWrap="{Binding WordWrap}"
                        Document="{Binding Document}"                        
                        Background="{DynamicResource {x:Static vsShell:EnvironmentColors.SystemBackgroundBrushKey}}"
                        Foreground="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"
                        Grid.Row="1"/>
                    
                </Grid>
            </DataTemplate>
        </TabControl.ContentTemplate>
    </TabControl>

</UserControl><commit_msg>Fix toolwindow colors<commit_after>﻿<UserControl x:Class="StackTraceExplorer.StackTraceExplorerToolWindowControl"
             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:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
             xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
             xmlns:vsShell="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
             xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
             xmlns:stacktraceexplorer="clr-namespace:StackTraceExplorer"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300"
             DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <TabControl ItemsSource="{Binding StackTraces}" x:Name="StackTraceTabs"                
                Background="{DynamicResource {x:Static vsShell:EnvironmentColors.MainWindowActiveCaptionBrushKey}}">
        <!-- Change TabControl Grid to control tabstrip -->
        <TabControl.Resources>
            <Style TargetType="{x:Type Grid}">
                <Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.EnvironmentBackgroundBrushKey}}"/>
            </Style>
            <Style TargetType="{x:Type TabItem}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TabItem}">
                            <Grid>
                                <Border Name="Border">
                                    <ContentPresenter x:Name="ContentSite" Margin="3" VerticalAlignment="Center"
                                        HorizontalAlignment="Center"
                                        ContentSource="Header" >
                                    </ContentPresenter>
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.TitleBarActiveBorderBrushKey}}" />
                                    <Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.TitleBarActiveTextBrushKey}}"/>
                                </Trigger>
                                <Trigger Property="IsSelected" Value="False">
                                    <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.TitleBarInactiveBrushKey}}" />
                                    <Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.TitleBarInactiveTextBrushKey}}"/>
                                </Trigger>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.FileTabHotBorderBrushKey}}" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </TabControl.Resources>
        <!-- Change ItemTemplate to control content on tabs -->
        <TabControl.ItemTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal" x:Name="StackTraceTab">
                    <TextBlock Text="Stack Trace" />
                    <imaging:CrispImage Width="10" Height="10" Margin="5,2,0,0" Moniker="{x:Static catalog:KnownMonikers.Close}" MouseDown="CloseButton_MouseDown" />
                </StackPanel>
            </DataTemplate>
        </TabControl.ItemTemplate>
        <!-- Change ContentTemplate to control main content -->
        <TabControl.ContentTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>

                    <StackPanel HorizontalAlignment="Left" Margin="3">
                        <ToggleButton IsChecked="{Binding WordWrap, Mode=TwoWay}">
                            <ToggleButton.Template>
                                <ControlTemplate TargetType="ToggleButton">
                                    <Border x:Name="WrapBorder" BorderBrush="SteelBlue" BorderThickness="0">
                                        <imaging:CrispImage Width="16" Height="16" Moniker="{x:Static catalog:KnownMonikers.WordWrap}" />
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsChecked" Value="False">
                                            <Setter Property="ToolTip" Value="Enable wrapping of words" />
                                            <Setter TargetName="WrapBorder" Property="BorderThickness" Value="0"/>
                                        </Trigger>
                                        <Trigger Property="IsChecked" Value="True">
                                            <Setter Property="ToolTip" Value="Disable wrapping of words" />
                                            <Setter TargetName="WrapBorder" Property="BorderThickness" Value="1"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </ToggleButton.Template>
                        </ToggleButton>
                    </StackPanel>

                    <stacktraceexplorer:StackTraceEditor 
                        x:Name="TextEditor"
                        SyntaxHighlighting="C#"
                        FontFamily="Consolas"
                        FontSize="10pt"
                        WordWrap="{Binding WordWrap}"
                        Document="{Binding Document}"                        
                        Background="{DynamicResource {x:Static vsShell:EnvironmentColors.ScrollBarBorderBrushKey}}"
                        Foreground="{DynamicResource {x:Static vsShell:EnvironmentColors.StartPageTextSubHeadingSelectedBrushKey}}"
                        Grid.Row="1"/>
                    
                </Grid>
            </DataTemplate>
        </TabControl.ContentTemplate>
    </TabControl>

</UserControl>
{'fraction_non_alphanumeric': 0.10127244204287955, 'fraction_numerical': 0.007756667247690431, 'mean_word_length': 1.5471698113207548, 'pattern_counts': {'":': 0, '<': 128, '<?xml version=': 0, '>': 128, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 20}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 43, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3399958', 'n_tokens_mistral': 2675, 'n_tokens_neox': 2399, 'n_words': 362}