<Window x:Class="HandBrakeWPF.Views.PreviewView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:cal="http://www.caliburnproject.org"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Title="{Binding Title}"
        Width="380"
        Background="#FFF1F0EF"
        ResizeMode="NoResize"
        SizeToContent="Height"
        WindowStartupLocation="CenterScreen"
        TextOptions.TextFormattingMode="Display"
        mc:Ignorable="d">

    <Window.Resources>
        <Style TargetType="Button">
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="Padding" Value="5,1" />
            <Setter Property="FontSize" Value="11.5" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
    </Window.Resources>

    <StackPanel Orientation="Vertical">

        <StackPanel Grid.Row="0"
                    Height="30"
                    Margin="0,0,0,10"
                    Background="White"
                    Orientation="Horizontal">
            <Image Width="24"
                   Height="24"
                   Margin="10,0,5,0"
                   VerticalAlignment="Center"
                   Source="Images/window.png" />
            <StackPanel VerticalAlignment="Center" Orientation="Vertical">
                <TextBlock FontWeight="Bold" Text="Create a video preview" />
            </StackPanel>
        </StackPanel>

        <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
            <TextBlock Margin="0,0,5,0"
                       VerticalAlignment="Center"
                       Text="Start at Preview:" />
            <ComboBox Width="60"
                      ItemsSource="{Binding StartPoints}"
                      SelectedItem="{Binding StartAt}" />

            <TextBlock Margin="10,0,5,0"
                       VerticalAlignment="Center"
                       Text="Duration:" />
            <ComboBox Width="60"
                      ItemsSource="{Binding AvailableDurations}"
                      SelectedItem="{Binding Duration}" />
        </StackPanel>

        <StackPanel Margin="10,10,0,0" Orientation="Horizontal">
            <ProgressBar Width="310"
                         Height="22"
                         Maximum="100"
                         Minimum="0"
                         Value="{Binding PercentageValue}" />
            <TextBlock Margin="5,0,0,0" Text="{Binding Percentage}" />
        </StackPanel>

        <StackPanel Width="360"
                    Margin="10,10,0,10"
                    Orientation="Horizontal">
            <CheckBox VerticalAlignment="Center"
                      Content="Use system default player"
                      IsChecked="{Binding UseSystemDefaultPlayer}" />
            <Button Margin="10,0,0,0"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    cal:Message.Attach="[Event Click] = [Action Play]"
                    Content="Play"
                    IsDefault="True"
                    Padding="8,2" />
        </StackPanel>
    </StackPanel>
</Window>
