<commit_before>﻿<Dialogs:BaseMetroDialog xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
                         xmlns:Converters="clr-namespace:MahApps.Metro.Converters"
                         xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs"
                         xmlns:Behaviors="clr-namespace:MahApps.Metro.Behaviours"
                         x:Class="MahApps.Metro.Controls.Dialogs.LoginDialog">
    <Dialogs:BaseMetroDialog.Resources>
        <Converters:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
    </Dialogs:BaseMetroDialog.Resources>
    <Grid Margin="0 10 0 0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"
                           MinHeight="20" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0"
                   Margin="0 5 0 0"
                   FontSize="{DynamicResource DialogMessageFontSize}"
                   Text="{Binding Message, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                   TextWrapping="Wrap"
                   Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
        <TextBox Grid.Row="1"
                 Margin="0 5 0 0"
                 FontSize="{DynamicResource DialogMessageFontSize}"
                 x:Name="PART_TextBox"
                 Controls:TextBoxHelper.Watermark="{Binding UsernameWatermark, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                 Controls:TextBoxHelper.SelectAllOnFocus="True"
                 Text="{Binding Username, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                 TextWrapping="Wrap"
                 Visibility="{Binding ShouldHideUsername, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                 Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
        <PasswordBox Grid.Row="2"
                     Margin="0 5 0 0"
                     FontSize="{DynamicResource DialogMessageFontSize}"
                     x:Name="PART_TextBox2"
                     Behaviors:PasswordBoxBindingBehavior.Password="{Binding Password, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                     Controls:TextBoxHelper.Watermark="{Binding PasswordWatermark, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                     Controls:TextBoxHelper.SelectAllOnFocus="True"<commit_msg>use Viibility helper<commit_after>﻿<Dialogs:BaseMetroDialog xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
                         xmlns:Converters="clr-namespace:MahApps.Metro.Converters"
                         xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs"
                         xmlns:Behaviors="clr-namespace:MahApps.Metro.Behaviours"
                         x:Class="MahApps.Metro.Controls.Dialogs.LoginDialog">
    <Grid Margin="0 10 0 0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"
                           MinHeight="20" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0"
                   Margin="0 5 0 0"
                   FontSize="{DynamicResource DialogMessageFontSize}"
                   Text="{Binding Message, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                   TextWrapping="Wrap"
                   Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
        <TextBox Grid.Row="1"
                 Margin="0 5 0 0"
                 FontSize="{DynamicResource DialogMessageFontSize}"
                 x:Name="PART_TextBox"
                 Controls:TextBoxHelper.Watermark="{Binding UsernameWatermark, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                 Controls:TextBoxHelper.SelectAllOnFocus="True"
                 Text="{Binding Username, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                 TextWrapping="Wrap"
                 Controls:VisibilityHelper.IsCollapsed="{Binding ShouldHideUsername, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                 Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
        <PasswordBox Grid.Row="2"
                     Margin="0 5 0 0"
                     FontSize="{DynamicResource DialogMessageFontSize}"
                     x:Name="PART_TextBox2"
                     Behaviors:PasswordBoxBindingBehavior.Password="{Binding Password, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                     Controls:TextBoxHelper.Watermark="{Binding PasswordWatermark, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                     Controls:TextBoxHelper.SelectAllOnFocus="True"
{'fraction_non_alphanumeric': 0.09742252224608776, 'fraction_numerical': 0.009512120282295183, 'mean_word_length': 2.9993865030674844, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 26, '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': '6806157', 'n_tokens_mistral': 1758, 'n_tokens_neox': 1601, 'n_words': 213}