<UserControl x:Class="MyPad.Views.Regions.PropertyView"
             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:i="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:p="http://prismlibrary.com/"
             xmlns:m="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:mi="http://metro.mahapps.com/winfx/xaml/iconpacks"
             xmlns:le="http://wpflocalizeextension.codeplex.com"
             xmlns:qc="http://QuickConverter.CodePlex.com/"
             xmlns:ge="clr-namespace:SourceChord.GridExtra;assembly=GridExtra.Wpf"
             mc:Ignorable="d" 
             p:ViewModelLocator.AutoWireViewModel="True"
             d:DesignHeight="450" d:DesignWidth="800">

    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel Margin="5 0 0 0">
            <StackPanel.Resources>
                <Style x:Key="PropertyName" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Common.TextBlock}">
                    <Setter Property="FontSize" Value="{DynamicResource MahApps.Font.Size.Default}"/>
                </Style>
                <Style x:Key="PropertyValue" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Common.TextBlock}">
                    <Setter Property="Margin" Value="20 0 0 5"/>
                    <Setter Property="TextWrapping" Value="Wrap"/>
                </Style>
            </StackPanel.Resources>

            <Button Click="{qc:QuickEvent 'Clipboard.SetText($dataContext.FileName)'}"
                    Style="{StaticResource Common.ChromelessButton}"
                    HorizontalContentAlignment="Left">
                <StackPanel Orientation="Horizontal">
                    <mi:Codicons Kind="Copy"/>
                    <Border Width="5"/>
                    <TextBlock Text="{le:Loc Command_CopyFullPath}"/>
                </StackPanel>
            </Button>

            <Border Height="10"/>

            <TextBlock Text="{le:Loc Label_Name}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{qc:Binding 'Path.GetFileName($P)', P={Binding FileName, Mode=OneWay}}" Style="{StaticResource PropertyValue}"/>
            <TextBlock Text="{le:Loc Label_Type}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{Binding FileType, Mode=OneWay}" Style="{StaticResource PropertyValue}"/>
            <TextBlock Text="{le:Loc Label_Location}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{Binding FileInfo.DirectoryName, Mode=OneWay}" Style="{StaticResource PropertyValue}"/>
            <TextBlock Text="{le:Loc Label_Size}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{Binding FileInfo.Length, StringFormat={}{0:N0} bytes, Mode=OneWay}" Style="{StaticResource PropertyValue}"/>
            <TextBlock Text="{le:Loc Label_CreationDate}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{Binding FileInfo.CreationTime, StringFormat=yyyy/MM/dd HH:mm:ss, Mode=OneWay}" Style="{StaticResource PropertyValue}"/>
            <TextBlock Text="{le:Loc Label_ModifiredDate}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{Binding FileInfo.LastWriteTime, StringFormat=yyyy/MM/dd HH:mm:ss, Mode=OneWay}" Style="{StaticResource PropertyValue}"/>
            <TextBlock Text="{le:Loc Label_AccessDate}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{Binding FileInfo.LastAccessTime, StringFormat=yyyy/MM/dd HH:mm:ss, Mode=OneWay}" Style="{StaticResource PropertyValue}"/>
            <TextBlock Text="{le:Loc Label_Attributes}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{Binding FileInfo.Attributes, Mode=OneWay}" Style="{StaticResource PropertyValue}"/>
            <TextBlock Text="{le:Loc Label_Owner}" Style="{StaticResource PropertyName}"/>
            <TextBlock Text="{Binding FileOwner, Mode=OneWay}" Style="{StaticResource PropertyValue}"/>
        </StackPanel>
    </ScrollViewer>

</UserControl>
