<commit_before>﻿<UserControl x:Class="twitch_tv_viewer.Views.Components.ChannelsDisplay"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:components="clr-namespace:twitch_tv_viewer.ViewModels.Components"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DataContext="{d:DesignInstance components:ChannelsDisplayViewModel}"
             mc:Ignorable="d">
    <UserControl.DataContext>
        <Binding Path="Channels" Source="{StaticResource Locator}" />
    </UserControl.DataContext>
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <i:InvokeCommandAction Command="{Binding WindowLoaded}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <DataGrid Height="auto"
              HorizontalAlignment="Stretch"
              VerticalAlignment="Stretch"
              ItemsSource="{Binding Channels}"
              SelectedItem="{Binding SelectedChannel,
                                     Mode=TwoWay}">
        <DataGrid.ContextMenu>
            <ContextMenu>
                <MenuItem Command="{Binding OpenStreamCommand}" Header="Open twitch page" />
                <MenuItem Command="{Binding OpenChatCommand}" Header="Open chat" />
                <MenuItem Command="{Binding DeleteCommand}" Header="Delete" />
            </ContextMenu>
        </DataGrid.ContextMenu>
        <DataGrid.InputBindings>
            <MouseBinding Command="{Binding ClickCommand}" MouseAction="LeftDoubleClick" />
            <KeyBinding Key="D" Command="{Binding DeleteCommand}" />
            <KeyBinding Key="Delete" Command="{Binding DeleteCommand}" />
            <KeyBinding Key="Enter" Command="{Binding ClickCommand}" />
            <KeyBinding Key="C"
                        Command="{Binding CopyCommand}"
                        Modifiers="Control" />
        </DataGrid.InputBindings>
        <DataGrid.Columns>
            <DataGridTextColumn Width="160"
                                Binding="{Binding Name}"
                                ElementStyle="{StaticResource ColumnElementStyle}" />
            <DataGridTextColumn Width="155"
                                Binding="{Binding Game}"
                                ElementStyle="{StaticResource ColumnElementStyle}" />
            <DataGridTextColumn Width="*"
                                Binding="{Binding Status}"
                                ElementStyle="{StaticResource ColumnElementStyle}" />
            <DataGridTextColumn Width="80"
                                Binding="{Binding Viewers}"
                                ElementStyle="{StaticResource ColumnElementStyle}" />
        </DataGrid.Columns>
    </DataGrid><commit_msg>Add style to remove some white on contextmenu<commit_after>﻿<UserControl x:Class="twitch_tv_viewer.Views.Components.ChannelsDisplay"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:components="clr-namespace:twitch_tv_viewer.ViewModels.Components"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DataContext="{d:DesignInstance components:ChannelsDisplayViewModel}"
             mc:Ignorable="d">
    <UserControl.Resources>
        <Style x:Key="MenuItemStyle1" TargetType="{x:Type MenuItem}">
            <Style.BasedOn>
                <Style TargetType="{x:Type MenuItem}">
                    <Setter Property="OverridesDefaultStyle" Value="True" />
                    <Setter Property="HorizontalContentAlignment"
                            Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
                    <Setter Property="VerticalContentAlignment"
                            Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
                    <Setter Property="Foreground" Value="{StaticResource Text}" />
                    <Setter Property="Background" Value="{StaticResource Background}" />
                    <Setter Property="BorderThickness" Value="0" />
                    <Setter Property="FontFamily" Value="{StaticResource Font}" />
                    <Setter Property="FontSize" Value="{StaticResource FontSize}" />
                    <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeightKey}}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type MenuItem}">
                                <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        Background="{TemplateBinding Background}" SnapsToDevicePixels="True"
                                        Uid="Border_38">
                                    <Grid x:Name="Grid" Uid="Grid_49">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition MinWidth="17" SharedSizeGroup="MenuItemIconColumnGroup"
                                                              Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto" />
                                            <ColumnDefinition Width="14" />
                                        </Grid.ColumnDefinitions>
                                        <Path x:Name="GlyphPanel" Data="M0,2L0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6z"
                                              Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight"
                                              Margin="4,0,6,0" Uid="Path_12" Visibility="Hidden"
                                              VerticalAlignment="Center" />
                                        <ContentPresenter x:Name="ContentPresenter"
                                                          ContentTemplate="{TemplateBinding HeaderTemplate}"
                                                          Content="{TemplateBinding Header}" Grid.Column="1"
                                                          ContentSource="Header" Margin="{TemplateBinding Padding}"
                                                          RecognizesAccessKey="True"
                                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                          Uid="ContentPresenter_33" />
                                        <TextBlock x:Name="InputGestureText" Grid.Column="2" DockPanel.Dock="Right"
                                                   Margin="5,2,0,2" Text="{TemplateBinding InputGestureText}"
                                                   Uid="TextBlock_10" />
                                    </Grid>
                                </Border>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="IsChecked" Value="True">
                                        <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
                                    </Trigger>
                                    <DataTrigger Value="False">
                                        <DataTrigger.Binding>
                                            <Binding ElementName="MenuItemIcon" Path="Source" />
                                        </DataTrigger.Binding>
                                        <Setter Property="VerticalAlignment" TargetName="ContentPresenter"
                                                Value="Center" />
                                    </DataTrigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                    <Style.Triggers>
                        <Trigger Property="Role" Value="TopLevelHeader">
                            <Setter Property="Margin" Value="0,1" />
                            <Setter Property="Padding" Value="6,3" />
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type MenuItem}">
                                        <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                Background="{TemplateBinding Background}" SnapsToDevicePixels="True"
                                                Uid="Border_39">
                                            <DockPanel x:Name="DockPanel" Uid="DockPanel_4">
                                                <Path x:Name="GlyphPanel"
                                                      Data="M0,2L0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6z"
                                                      Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight"
                                                      Margin="4,0,6,0" Uid="Path_13" Visibility="Collapsed"
                                                      VerticalAlignment="Center" />
                                                <ContentPresenter x:Name="ContentPresenter"
                                                                  ContentTemplate="{TemplateBinding HeaderTemplate}"
                                                                  Content="{TemplateBinding Header}"
                                                                  ContentSource="Header"
                                                                  Margin="{TemplateBinding Padding}"
                                                                  RecognizesAccessKey="True"
                                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                                  Uid="ContentPresenter_35" />
                                            </DockPanel>
                                        </Border>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsChecked" Value="True">
                                                <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="Role" Value="TopLevelItem">
                            <Setter Property="Padding" Value="6,3" />
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type MenuItem}">
                                        <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                Background="{TemplateBinding Background}" SnapsToDevicePixels="True"
                                                Uid="Border_41">
                                            <DockPanel x:Name="DockPanel" Uid="DockPanel_5">
                                                <Path x:Name="GlyphPanel"
                                                      Data="M0,2L0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6z"
                                                      Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight"
                                                      Margin="4,0,6,0" Uid="Path_14" Visibility="Collapsed"
                                                      VerticalAlignment="Center" />
                                                <ContentPresenter x:Name="ContentPresenter"
                                                                  ContentTemplate="{TemplateBinding HeaderTemplate}"
                                                                  Content="{TemplateBinding Header}"
                                                                  ContentSource="Header"
                                                                  Margin="{TemplateBinding Padding}"
                                                                  RecognizesAccessKey="True"
                                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                                  Uid="ContentPresenter_37" />
                                            </DockPanel>
                                        </Border>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsChecked" Value="True">
                                                <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="Role" Value="SubmenuHeader">
                            <Setter Property="Padding" Value="0,2" />
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type MenuItem}">
                                        <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                Background="{TemplateBinding Background}" SnapsToDevicePixels="True"
                                                Uid="Border_42">
                                            <Grid x:Name="Grid" Uid="Grid_50">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition MinWidth="17"
                                                                      SharedSizeGroup="MenuItemIconColumnGroup"
                                                                      Width="Auto" />
                                                    <ColumnDefinition Width="*" />
                                                    <ColumnDefinition MinWidth="5"
                                                                      SharedSizeGroup="MenuItemIGTColumnGroup"
                                                                      Width="Auto" />
                                                    <ColumnDefinition Width="14" />
                                                </Grid.ColumnDefinitions>
                                                <Path x:Name="GlyphPanel"
                                                      Data="M0,2L0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6z"
                                                      Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight"
                                                      Margin="4,0,6,0" Uid="Path_15" Visibility="Hidden"
                                                      VerticalAlignment="Center" />
                                                <ContentPresenter x:Name="ContentPresenter"
                                                                  ContentTemplate="{TemplateBinding HeaderTemplate}"
                                                                  Content="{TemplateBinding Header}" Grid.Column="1"
                                                                  ContentSource="Header"
                                                                  Margin="{TemplateBinding Padding}"
                                                                  RecognizesAccessKey="True"
                                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                                  Uid="ContentPresenter_39" />
                                                <Path x:Name="Path" Grid.Column="3" DockPanel.Dock="Right"
                                                      Data="M0,0L4,3.5 0,7z" Fill="{TemplateBinding Foreground}"
                                                      Margin="4,0,6,0" Uid="Path_16" VerticalAlignment="Center" />
                                            </Grid>
                                        </Border>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsChecked" Value="True">
                                                <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="Role" Value="SubmenuItem">
                            <Setter Property="DockPanel.Dock" Value="Top" />
                            <Setter Property="Padding" Value="0,4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="{DynamicResource ListItemHighlightForegroundBrush}" />
                            <Setter Property="Background" Value="#101C1C" />
                            <Setter Property="BorderBrush" Value="#101C1C" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{DynamicResource ListItemDisabledForegroundBrush}" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </Style.BasedOn>
        </Style>
    </UserControl.Resources>
    <UserControl.DataContext>
        <Binding Path="Channels" Source="{StaticResource Locator}" />
    </UserControl.DataContext>
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <i:InvokeCommandAction Command="{Binding WindowLoaded}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <DataGrid Height="auto"
              HorizontalAlignment="Stretch"
              VerticalAlignment="Stretch"
              ItemsSource="{Binding Channels}"
              SelectedItem="{Binding SelectedChannel,
                                     Mode=TwoWay}">
        <DataGrid.ContextMenu>
            <ContextMenu >
                <MenuItem Command="{Binding OpenStreamCommand}" Header="Open twitch page"
                          Style="{DynamicResource MenuItemStyle1}" />
                <MenuItem Command="{Binding OpenChatCommand}" Header="Open chat"
                          Style="{DynamicResource MenuItemStyle1}" />
                <MenuItem Command="{Binding DeleteCommand}" Header="Delete" Style="{DynamicResource MenuItemStyle1}" />
            </ContextMenu>
        </DataGrid.ContextMenu>
        <DataGrid.InputBindings>
            <MouseBinding Command="{Binding ClickCommand}" MouseAction="LeftDoubleClick" />
            <KeyBinding Key="D" Command="{Binding DeleteCommand}" />
            <KeyBinding Key="Delete" Command="{Binding DeleteCommand}" />
            <KeyBinding Key="Enter" Command="{Binding ClickCommand}" />
            <KeyBinding Key="C"
                        Command="{Binding CopyCommand}"
                        Modifiers="Control" />
        </DataGrid.InputBindings>
        <DataGrid.Columns>
            <DataGridTextColumn Width="160"
                                Binding="{Binding Name}"
                                ElementStyle="{StaticResource ColumnElementStyle}" />
            <DataGridTextColumn Width="155"
                                Binding="{Binding Game}"
                                ElementStyle="{StaticResource ColumnElementStyle}" />
            <DataGridTextColumn Width="*"
                                Binding="{Binding Status}"
                                ElementStyle="{StaticResource ColumnElementStyle}" />
            <DataGridTextColumn Width="80"
                                Binding="{Binding Viewers}"
                                ElementStyle="{StaticResource ColumnElementStyle}" />
        </DataGrid.Columns>
    </DataGrid>
{'fraction_non_alphanumeric': 0.09020003670398238, 'fraction_numerical': 0.010965314736648926, 'mean_word_length': 1.0418735362997658, 'pattern_counts': {'":': 0, '<': 194, '<?xml version=': 0, '>': 194, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 230, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3517991', 'n_tokens_mistral': 4282, 'n_tokens_neox': 3881, 'n_words': 638}