<commit_before>﻿<UserControl
    x:Class="PackageExplorer.PackageViewer"
    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:self="clr-namespace:PackageExplorer"
    xmlns:viewmodel="clr-namespace:PackageExplorerViewModel;assembly=PackageViewModel"
    xmlns:resources="clr-namespace:PackageExplorer.Resources"
    xmlns:effect="clr-namespace:GrayscaleEffect;assembly=GrayscaleEffect"
    xmlns:settings="clr-namespace:PackageExplorer.Properties"
    Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
    Visibility="{Binding Converter={StaticResource NullToVisibilityConverter}, FallbackValue=Collapsed}"
    mc:Ignorable="d" 
    d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="TemplateStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <ContextMenu x:Key="SharedContextMenu" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
                <MenuItem Header="_View Content" Command="{Binding ViewCommand}" CommandParameter="{Binding}" FontWeight="SemiBold" />
                <MenuItem Header="_Open in Windows shell..." Command="{Binding OpenCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="Open _with..." Command="{Binding OpenWithCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="_Save As..." Command="{Binding SaveCommand}" CommandParameter="{Binding}" />
                <Separator />
                <MenuItem Header="_Rename..." Command="{Binding RenameCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="_Delete" Command="{Binding DeleteCommand}" CommandParameter="{Binding}" />
            </ContextMenu>

            <ContextMenu x:Key="FolderSharedContextMenu" Opened="PackageFolderContextMenu_Opened" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
                <MenuItem Header="_Add Existing File..." Command="{Binding   AddContentFileCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="Add Ne_w Folder..." Command="{Binding AddNewFolderCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="_Rename..." Command="{Binding RenameCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="_Delete" Command="{Binding DeleteCommand}" CommandParameter="{Binding}" />
            </ContextMenu>

            <!-- data template for the package details pane -->
            <DataTemplate x:Key="PackageDetailTemplate">
                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="8">
                        <Border 
                            BorderBrush="{StaticResource {x:Static SystemColors.ActiveBorderBrushKey}}" 
                            BorderThickness="0.5" 
                            HorizontalAlignment="Left" 
                            Padding="2"
                            Background="White"
                            Margin="0,0,0,5"
                            ToolTipService.ToolTip="{Binding IconUrl, Mode=OneTime}"
                            Visibility="{Binding IconUrl, Converter={StaticResource NullToVisibilityConverter}}">
                            <Image         
                                Source="{Binding IconUrl}" 
                                Width="32" 
                                Height="32" 
                                Stretch="Fill" 
                                StretchDirection="DownOnly" />
                        </Border>

                        <!-- Id -->
                        <StackPanel Style="{StaticResource DetailMetadataStyle}">
                            <TextBlock Text="{x:Static resources:Resources.Dialog_IdLabel}" Style="{StaticResource DetailMetadataLabelStyle}" />
                            <TextBlock Text="{Binding Id}" Style="{StaticResource DetailMetadataValueStyle}"  />
                        </StackPanel>

                        <!-- Title -->
                        <DockPanel Margin="0,3,0,0" Visibility="{Binding Title, Converter={StaticResource NullToVisibilityConverter}}">
                            <TextBlock DockPanel.Dock="Left" Text="{x:Static resources:Resources.Dialog_TitleLabel}" Style="{StaticResource DetailMetadataLabelStyle}" />
                            <TextBlock Text="{Binding Title}" Style="{StaticResource DetailMetadataValueStyle}" TextTrimming="CharacterEllipsis" />
                        </DockPanel>

                        <!-- Version -->
                        <StackPanel Style="{StaticResource DetailMetadataStyle}">
                            <TextBlock Text="{x:Static resources:Resources.Dialog_VersionLabel}" Style="{StaticResource DetailMetadataLabelStyle}" />
                            <TextBlock Text="{Binding Version}" Style="{StaticResource DetailMetadataValueStyle}"  />
                        </StackPanel>

                        <!-- Authors -->
                        <DockPanel Margin="0,3,0,0">
                            <TextBlock DockPanel.Dock="Left" Text="{x:Static resources:Resources.Dialog_CreatedByLabel}" Style="{StaticResource DetailMetadataLabelStyle}" />
                            <TextBlock Text="{Binding Authors, Converter={StaticResource authorNamesConverter}}" Style="{StaticResource DetailMetadataValueStyle}" TextWrapping="Wrap" />
                        </DockPanel><commit_msg>[Package Explorer] Move Title field below Version field.<commit_after>﻿<UserControl
    x:Class="PackageExplorer.PackageViewer"
    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:self="clr-namespace:PackageExplorer"
    xmlns:viewmodel="clr-namespace:PackageExplorerViewModel;assembly=PackageViewModel"
    xmlns:resources="clr-namespace:PackageExplorer.Resources"
    xmlns:effect="clr-namespace:GrayscaleEffect;assembly=GrayscaleEffect"
    xmlns:settings="clr-namespace:PackageExplorer.Properties"
    Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
    Visibility="{Binding Converter={StaticResource NullToVisibilityConverter}, FallbackValue=Collapsed}"
    mc:Ignorable="d" 
    d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="TemplateStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <ContextMenu x:Key="SharedContextMenu" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
                <MenuItem Header="_View Content" Command="{Binding ViewCommand}" CommandParameter="{Binding}" FontWeight="SemiBold" />
                <MenuItem Header="_Open in Windows shell..." Command="{Binding OpenCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="Open _with..." Command="{Binding OpenWithCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="_Save As..." Command="{Binding SaveCommand}" CommandParameter="{Binding}" />
                <Separator />
                <MenuItem Header="_Rename..." Command="{Binding RenameCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="_Delete" Command="{Binding DeleteCommand}" CommandParameter="{Binding}" />
            </ContextMenu>

            <ContextMenu x:Key="FolderSharedContextMenu" Opened="PackageFolderContextMenu_Opened" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
                <MenuItem Header="_Add Existing File..." Command="{Binding   AddContentFileCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="Add Ne_w Folder..." Command="{Binding AddNewFolderCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="_Rename..." Command="{Binding RenameCommand}" CommandParameter="{Binding}" />
                <MenuItem Header="_Delete" Command="{Binding DeleteCommand}" CommandParameter="{Binding}" />
            </ContextMenu>

            <!-- data template for the package details pane -->
            <DataTemplate x:Key="PackageDetailTemplate">
                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="8">
                        <Border 
                            BorderBrush="{StaticResource {x:Static SystemColors.ActiveBorderBrushKey}}" 
                            BorderThickness="0.5" 
                            HorizontalAlignment="Left" 
                            Padding="2"
                            Background="White"
                            Margin="0,0,0,5"
                            ToolTipService.ToolTip="{Binding IconUrl, Mode=OneTime}"
                            Visibility="{Binding IconUrl, Converter={StaticResource NullToVisibilityConverter}}">
                            <Image         
                                Source="{Binding IconUrl}" 
                                Width="32" 
                                Height="32" 
                                Stretch="Fill" 
                                StretchDirection="DownOnly" />
                        </Border>

                        <!-- Id -->
                        <StackPanel Style="{StaticResource DetailMetadataStyle}">
                            <TextBlock Text="{x:Static resources:Resources.Dialog_IdLabel}" Style="{StaticResource DetailMetadataLabelStyle}" />
                            <TextBlock Text="{Binding Id}" Style="{StaticResource DetailMetadataValueStyle}"  />
                        </StackPanel>

                        <!-- Version -->
                        <StackPanel Style="{StaticResource DetailMetadataStyle}">
                            <TextBlock Text="{x:Static resources:Resources.Dialog_VersionLabel}" Style="{StaticResource DetailMetadataLabelStyle}" />
                            <TextBlock Text="{Binding Version}" Style="{StaticResource DetailMetadataValueStyle}"  />
                        </StackPanel>

                        <!-- Title -->
                        <DockPanel Margin="0,3,0,0" Visibility="{Binding Title, Converter={StaticResource NullToVisibilityConverter}}">
                            <TextBlock DockPanel.Dock="Left" Text="{x:Static resources:Resources.Dialog_TitleLabel}" Style="{StaticResource DetailMetadataLabelStyle}" />
                            <TextBlock Text="{Binding Title}" Style="{StaticResource DetailMetadataValueStyle}" TextTrimming="CharacterEllipsis" />
                        </DockPanel>

                        <!-- Authors -->
                        <DockPanel Margin="0,3,0,0">
                            <TextBlock DockPanel.Dock="Left" Text="{x:Static resources:Resources.Dialog_CreatedByLabel}" Style="{StaticResource DetailMetadataLabelStyle}" />
                            <TextBlock Text="{Binding Authors, Converter={StaticResource authorNamesConverter}}" Style="{StaticResource DetailMetadataValueStyle}" TextWrapping="Wrap" />
                        </DockPanel>
{'fraction_non_alphanumeric': 0.1168875587858059, 'fraction_numerical': 0.007182556648140231, 'mean_word_length': 2.3161326906719593, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 20}, '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': '5217693', 'n_tokens_mistral': 2852, 'n_tokens_neox': 2547, 'n_words': 426}