<commit_before>﻿<Window x:Class="CoordinateConversionLibrary.Views.AdditionalFieldsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:helpers="clr-namespace:CoordinateConversionLibrary.Helpers"
        xmlns:local="clr-namespace:CoordinateConversionLibrary"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:prop="clr-namespace:CoordinateConversionLibrary.Properties"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        Title="{Binding ViewDetailsTitle}"
        WindowStartupLocation="CenterScreen"
        ResizeMode="CanResize"
        Width="Auto"
        SizeToContent="Height"
        helpers:DialogCloser.DialogResult="{Binding DialogResult}"
        Topmost="True"
        WindowStyle="ToolWindow"
        SizeChanged="Window_SizeChanged"
        mc:Ignorable="d">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/CoordinateConversionLibrary;component/MAResourceDictionary.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid Width="Auto">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock Text="{Binding ViewDetailsTitle}" Height="0" Margin="30,0,30,0" x:Name="titleText" 
                   Width="Auto" Grid.Row="0"/>
        <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding FieldsCollection}"
                CanUserAddRows="False"
                CanUserDeleteRows="False"
                CanUserReorderColumns="False"
                CanUserResizeRows="False"
                CanUserSortColumns="False"
                HeadersVisibility="Column"
                IsReadOnly="True"
                RowHeight="25"
                Name="dgFieldsInfo" 
                Grid.Row="0"
                VerticalAlignment="Top">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Field Name" Binding="{Binding Path=FieldName}" FontWeight="Bold" Width="Auto"/>
                <DataGridTextColumn Header="Field Value" Binding="{Binding Path=FieldValue}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid>
        <Label Grid.Row="1" Content="{x:Static prop:Resources.InformationNotAvailableMsg}"
               Visibility="{Binding IsWarningVisible}"/>
    </Grid>
</Window><commit_msg>#593 - Hide Data grid when there is no content<commit_after>﻿<Window x:Class="CoordinateConversionLibrary.Views.AdditionalFieldsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:helpers="clr-namespace:CoordinateConversionLibrary.Helpers"
        xmlns:local="clr-namespace:CoordinateConversionLibrary"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:prop="clr-namespace:CoordinateConversionLibrary.Properties"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        Title="{Binding ViewDetailsTitle}"
        WindowStartupLocation="CenterScreen"
        ResizeMode="CanResize"
        Width="Auto"
        SizeToContent="Height"
        helpers:DialogCloser.DialogResult="{Binding DialogResult}"
        Topmost="True"
        WindowStyle="ToolWindow"
        SizeChanged="Window_SizeChanged"
        mc:Ignorable="d">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/CoordinateConversionLibrary;component/MAResourceDictionary.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid Width="Auto">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock Text="{Binding ViewDetailsTitle}" Height="0" Margin="30,0,30,0" x:Name="titleText" 
                   Width="Auto" Grid.Row="0"/>
        <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding FieldsCollection}"
                CanUserAddRows="False"
                CanUserDeleteRows="False"
                CanUserReorderColumns="False"
                CanUserResizeRows="False"
                CanUserSortColumns="False"
                HeadersVisibility="Column"
                IsReadOnly="True"
                RowHeight="25"
                Name="dgFieldsInfo" 
                Grid.Row="0"
                VerticalAlignment="Top">
            <DataGrid.Style>
                <Style TargetType="DataGrid">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Items.Count, ElementName=dgFieldsInfo}" Value="0">
                            <Setter Property="Visibility" Value="Collapsed" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </DataGrid.Style>
            <DataGrid.Columns>
                <DataGridTextColumn Header="Field Name" Binding="{Binding Path=FieldName}" FontWeight="Bold" Width="Auto"/>
                <DataGridTextColumn Header="Field Value" Binding="{Binding Path=FieldValue}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid>
        <Label Grid.Row="1" Content="{x:Static prop:Resources.InformationNotAvailableMsg}"
               Visibility="{Binding IsWarningVisible}"/>
    </Grid>
</Window>
{'fraction_non_alphanumeric': 0.119245413637937, 'fraction_numerical': 0.010384215991692628, 'mean_word_length': 2.5497542997542997, 'pattern_counts': {'":': 0, '<': 58, '<?xml version=': 0, '>': 58, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, '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': '5221519', 'n_tokens_mistral': 1615, 'n_tokens_neox': 1476, 'n_words': 193}