<UserControl
    x:Class="JumpPoint.Uwp.Controls.ImagePropertiesControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:JumpPoint.Uwp.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="1200"
    d:DesignWidth="400">

    <UserControl.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="TextWrapping"
                    Value="WrapWholeWords" />
        </Style>
    </UserControl.Resources>

    <Grid ColumnSpacing="8"
          RowSpacing="4">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock Text="Image ID:" />
        <TextBlock Text="{x:Bind Image.ImageID, Mode=OneWay}"
                   Grid.Column="1" />

        <TextBlock Text="Bit Depth:"
                   Grid.Row="1" />
        <TextBlock Text="{x:Bind Image.BitDepth, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="1" />

        <TextBlock Text="Color Space:"
                   Grid.Row="2" />
        <TextBlock Text="{x:Bind Image.ColorSpace, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="2" />

        <TextBlock Text="Compression Level:"
                   Grid.Row="3" />
        <TextBlock Text="{x:Bind Image.CompressionLevel, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="3" />

        <TextBlock Text="Compression:"
                   Grid.Row="4" />
        <TextBlock Text="{x:Bind Image.Compression, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="4" />

        <MenuFlyoutSeparator Grid.Row="5"
                             Grid.ColumnSpan="2" />

        <TextBlock Text="Dimensions:"
                   Grid.Row="6" />
        <TextBlock Text="{x:Bind Image.Dimensions, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="6" />

        <TextBlock Text="Width:"
                   Grid.Row="7" />
        <TextBlock Text="{x:Bind Image.Width, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}{0} px', Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="7" />

        <TextBlock Text="Height:"
                   Grid.Row="8" />
        <TextBlock Text="{x:Bind Image.Height, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}{0} px', Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="8" />

        <TextBlock Text="Horizontal Resolution:"
                   Grid.Row="9" />
        <TextBlock Text="{x:Bind Image.HorizontalResolution, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="9" />

        <TextBlock Text="Vertical Resolution:"
                   Grid.Row="10" />
        <TextBlock Text="{x:Bind Image.VerticalResolution, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="10" />

        <TextBlock Text="Resolution Unit:"
                   Grid.Row="11" />
        <TextBlock Text="{x:Bind Image.ResolutionUnit, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="11" />

    </Grid>
</UserControl>
