<UserControl
    x:Class="JumpPoint.Uwp.Controls.PhotoPropertiesControl"
    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"
             xmlns:sys="using:System"
             xmlns:helper="using:JumpPoint.ViewModels.Helpers"
             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" />
            <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" />
            <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" />
            <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="Date Taken:" />
        <TextBlock Text="{x:Bind Photo.DateTaken, Converter={StaticResource NullableDateTimeOffsetToLocalConverter}, Mode=OneWay}"
                   Grid.Column="1" />

        <TextBlock Text="Event:"
                   Grid.Row="1" />
        <TextBlock Text="{x:Bind sys:String.Join('; ', Photo.Event), Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="1" />

        <TextBlock Text="EXIF Version:"
                   Grid.Row="2" />
        <TextBlock Text="{x:Bind Photo.EXIFVersion, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="2" />

        <TextBlock Text="Orientation:"
                   Grid.Row="3" />
        <TextBlock Text="{x:Bind Photo.Orientation, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="3" />

        <TextBlock Text="People Names:"
                   Grid.Row="4" />
        <TextBlock Text="{x:Bind sys:String.Join('; ', Photo.PeopleNames), Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="4" />

        <TextBlock Text="Transcoded for Sync:"
                   Grid.Row="5" />
        <TextBlock Text="{x:Bind Photo.TranscodedForSync, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="5" />

        <TextBlock Text="View Tags:"
                   Grid.Row="6" />
        <TextBlock Text="{x:Bind sys:String.Join('; ', Photo.ViewTags), Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="6" />

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

        <TextBlock Text="Aperture:"
                   Grid.Row="8" />
        <TextBlock Text="{x:Bind Photo.Aperture, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="8" />

        <TextBlock Text="Brightness:"
                   Grid.Row="9" />
        <TextBlock Text="{x:Bind Photo.Brightness, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="9" />

        <TextBlock Text="Contrast:"
                   Grid.Row="10" />
        <TextBlock Text="{x:Bind Photo.Contrast, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="10" />

        <TextBlock Text="Digital Zoom:"
                   Grid.Row="11" />
        <TextBlock Text="{x:Bind Photo.DigitalZoom, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="11" />

        <TextBlock Text="Exposure Bias:"
                   Grid.Row="12" />
        <TextBlock Text="{x:Bind Photo.ExposureBias, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="12" />

        <TextBlock Text="Exposure Index:"
                   Grid.Row="13" />
        <TextBlock Text="{x:Bind Photo.ExposureIndex, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="13" />

        <TextBlock Text="Exposure Program:"
                   Grid.Row="14" />
        <TextBlock Text="{x:Bind Photo.ExposureProgram, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="14" />

        <TextBlock Text="Exposure Time:"
                   Grid.Row="15" />
        <TextBlock Text="{x:Bind Photo.ExposureTime, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="15" />

        <TextBlock Text="Flash:"
                   Grid.Row="16" />
        <TextBlock Text="{x:Bind Photo.Flash, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="16" />

        <TextBlock Text="Flash Energy:"
                   Grid.Row="17" />
        <TextBlock Text="{x:Bind Photo.FlashEnergy, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="17" />

        <TextBlock Text="FNumber:"
                   Grid.Row="18" />
        <TextBlock Text="{x:Bind Photo.FNumber, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="18" />

        <TextBlock Text="Focal Length:"
                   Grid.Row="19" />
        <TextBlock Text="{x:Bind Photo.FocalLength, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="19" />

        <TextBlock Text="Focal Length in Film:"
                   Grid.Row="20" />
        <TextBlock Text="{x:Bind Photo.FocalLengthInFilm, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="20" />

        <TextBlock Text="Focal Plane X Resolution:"
                   Grid.Row="21" />
        <TextBlock Text="{x:Bind Photo.FocalPlaneXResolution, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="21" />

        <TextBlock Text="Focal Plane Y Resolution:"
                   Grid.Row="22" />
        <TextBlock Text="{x:Bind Photo.FocalPlaneYResolution, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="22" />

        <TextBlock Text="Gain Control:"
                   Grid.Row="23" />
        <TextBlock Text="{x:Bind Photo.GainControl, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="23" />

        <TextBlock Text="ISO Speed:"
                   Grid.Row="24" />
        <TextBlock Text="{x:Bind Photo.ISOSpeed, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="24" />

        <TextBlock Text="Light Source:"
                   Grid.Row="25" />
        <TextBlock Text="{x:Bind Photo.LightSource, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="25" />

        <TextBlock Text="Max Aperture:"
                   Grid.Row="26" />
        <TextBlock Text="{x:Bind Photo.MaxAperture, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="26" />

        <TextBlock Text="Metering Mode:"
                   Grid.Row="27" />
        <TextBlock Text="{x:Bind Photo.MeteringMode, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="27" />

        <TextBlock Text="Photometric Interpretation:"
                   Grid.Row="28" />
        <TextBlock Text="{x:Bind Photo.PhotometricInterpretation, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="28" />

        <TextBlock Text="Program Mode:"
                   Grid.Row="29" />
        <TextBlock Text="{x:Bind Photo.ProgramMode, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="29" />

        <TextBlock Text="Saturation:"
                   Grid.Row="30" />
        <TextBlock Text="{x:Bind Photo.Saturation, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="30" />

        <TextBlock Text="Sharpness:"
                   Grid.Row="31" />
        <TextBlock Text="{x:Bind Photo.Sharpness, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="31" />

        <TextBlock Text="Shutter Speed:"
                   Grid.Row="32" />
        <TextBlock Text="{x:Bind Photo.ShutterSpeed, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="32" />

        <TextBlock Text="Subject Distance:"
                   Grid.Row="33" />
        <TextBlock Text="{x:Bind Photo.SubjectDistance, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="33" />

        <TextBlock Text="White Balance:"
                   Grid.Row="34" />
        <TextBlock Text="{x:Bind Photo.WhiteBalance, Converter={StaticResource HumanizerConverter}, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="34" />

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

        <TextBlock Text="Camera Manufacturer:"
                   Grid.Row="36" />
        <TextBlock Text="{x:Bind Photo.CameraManufacturer, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="36" />

        <TextBlock Text="Camera Model:"
                   Grid.Row="37" />
        <TextBlock Text="{x:Bind Photo.CameraModel, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="37" />

        <TextBlock Text="Camera Serial Number:"
                   Grid.Row="38" />
        <TextBlock Text="{x:Bind Photo.CameraSerialNumber, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="38" />

        <TextBlock Text="Flash Manufacturer:"
                   Grid.Row="39" />
        <TextBlock Text="{x:Bind Photo.FlashManufacturer, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="39" />

        <TextBlock Text="Flash Model:"
                   Grid.Row="40" />
        <TextBlock Text="{x:Bind Photo.FlashModel, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="40" />

        <TextBlock Text="Lens Manufacturer:"
                   Grid.Row="41" />
        <TextBlock Text="{x:Bind Photo.LensManufacturer, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="41" />

        <TextBlock Text="Lens Model:"
                   Grid.Row="42" />
        <TextBlock Text="{x:Bind Photo.LensModel, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="42" />

        <TextBlock Text="Maker Note:"
                   Grid.Row="43" />
        <TextBlock Text="{x:Bind helper:PropertyHelper.Buffer(Photo.MakerNote), Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="43" />

        <TextBlock Text="Maker Note Offset:"
                   Grid.Row="44" />
        <TextBlock Text="{x:Bind Photo.MakerNoteOffset, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="44" />

        <TextBlock Text="Related Sound File:"
                   Grid.Row="45" />
        <TextBlock Text="{x:Bind Photo.RelatedSoundFile, Mode=OneWay}"
                   Grid.Column="1"
                   Grid.Row="45" />

    </Grid>
</UserControl>
