<UserControl x:Class="HandBrakeWPF.Views.MetaDataView"
             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:converters="clr-namespace:HandBrakeWPF.Converters"
             xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="500">

    <UserControl.Resources>
        <converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />

        <Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
            <Setter Property="Margin" Value="0,5,0,0"></Setter>
        </Style>
    </UserControl.Resources>

    <Grid Margin="10,0,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>

        <TextBlock Text="{x:Static Properties:Resources.MetaDataView_Title}" FontWeight="Bold" Margin="0,5,0,0" Grid.Row="0" />

        <!-- Metadata Input Area -->
        <Grid Grid.Row="2"  Margin="0,10,0,10">
            <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="*" />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" MinWidth="100" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>


            <TextBlock Text="{x:Static Properties:Resources.MetadataView_TitleTag}" Grid.Row="0" Grid.Column="0" />
            <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding MetaData.Name, UpdateSourceTrigger=PropertyChanged}" Width="450" VerticalAlignment="Center" />

            <TextBlock Text="{x:Static Properties:Resources.MetadataView_Actors}" Grid.Row="1" Grid.Column="0" />
            <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding MetaData.Artist, UpdateSourceTrigger=PropertyChanged}" Width="450" VerticalAlignment="Center" />

            <TextBlock Text="{x:Static Properties:Resources.MetadataView_Director}" Grid.Row="2" />
            <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding MetaData.AlbumArtist, UpdateSourceTrigger=PropertyChanged}" Width="450" VerticalAlignment="Center" />

            <TextBlock Text="{x:Static Properties:Resources.MetadataView_ReleaseDate}" Grid.Row="3" Grid.Column="0" />
            <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding MetaData.ReleaseDate, UpdateSourceTrigger=PropertyChanged}" Width="450" VerticalAlignment="Center" />

            <TextBlock Text="{x:Static Properties:Resources.MetadataView_Comments}" Grid.Row="4" Grid.Column="0" />
            <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding MetaData.Comment, UpdateSourceTrigger=PropertyChanged}" Width="450" VerticalAlignment="Center" />

            <TextBlock Text="{x:Static Properties:Resources.MetadataView_Genre}" Grid.Row="5" Grid.Column="0" />
            <TextBox Grid.Row="5" Grid.Column="1" Text="{Binding MetaData.Genre, UpdateSourceTrigger=PropertyChanged}" Width="450" VerticalAlignment="Center" />

            <TextBlock Text="{x:Static Properties:Resources.MetadataView_Description}" Grid.Row="6" Grid.Column="0" />
            <TextBox Grid.Row="6" Grid.Column="1" Text="{Binding MetaData.Description, UpdateSourceTrigger=PropertyChanged}" Width="450" VerticalAlignment="Center" />

            <TextBlock Text="{x:Static Properties:Resources.MetadataView_Plot}" Grid.Row="7" Grid.Column="0" />
            <TextBox Grid.Row="7" Grid.Column="1" Text="{Binding MetaData.LongDescription, UpdateSourceTrigger=PropertyChanged}" Width="450" 
                     VerticalAlignment="Stretch" TextWrapping="WrapWithOverflow" VerticalContentAlignment="Stretch" />

        </Grid>

    </Grid>
    
</UserControl>
