<Window x:Class="butterflow_ui.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:loc="clr-namespace:butterflow_ui.Localization"
        xmlns:butterflow_ui="clr-namespace:butterflow_ui"
        mc:Ignorable="d"
        x:Name="butterflowUIWindow"
        Title="{x:Static loc:Localization.Title}" Height="450" Width="800">
    <DockPanel>
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="_File">
                //
            </MenuItem>
            <MenuItem Header="_Edit" />
            <MenuItem Header="_Help" />
        </Menu>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <GroupBox Grid.ColumnSpan="4"  Grid.Row="0" Header="{x:Static loc:Localization.FileInputGroupBox}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Label Grid.Column="0" Content="{x:Static loc:Localization.FileLabel}"/>
                    <TextBox Name="txtFileName" Grid.Column="1" IsReadOnly="True"/>
                    <Button Grid.Column="2" MinWidth="25" Name="btnFilePicker" Click="btnFilePicker_Click">...</Button>
                </Grid>
            </GroupBox>
            <GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Header="{x:Static loc:Localization.CommonOptionsGroupBox}">
                <ScrollViewer>
                    <StackPanel>
                        <butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.PlaybackRateLabel}">
                            <StackPanel Orientation="Vertical">
                                <butterflow_ui:ButterflowOption LabelValue="">
                                    <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._2xLabel}" Tag="2x" />
                                </butterflow_ui:ButterflowOption>
                                <butterflow_ui:ButterflowOption LabelValue="">
                                    <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._3xLabel}" Tag="3x" />
                                </butterflow_ui:ButterflowOption>
                                <butterflow_ui:ButterflowOption LabelValue="">
                                    <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._4xLabel}" Tag="4x" />
                                </butterflow_ui:ButterflowOption>
                                <butterflow_ui:ButterflowOption LabelValue="">
                                    <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._24fpsLabel}" Tag="24"/>
                                </butterflow_ui:ButterflowOption>
                                <butterflow_ui:ButterflowOption LabelValue="">
                                    <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._30fpsLabel}" Tag="30" />
                                </butterflow_ui:ButterflowOption>
                                <butterflow_ui:ButterflowOption LabelValue="">
                                    <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._60fpsLabel}" Tag="60" />
                                </butterflow_ui:ButterflowOption>
                                <butterflow_ui:ButterflowOption LabelValue="">
                                    <RadioButton GroupName="PlaybackRate" Checked="PlaybackRateRadioButton_Checked" Content="{x:Static loc:Localization._120fpsLabel}" Tag="120" />
                                </butterflow_ui:ButterflowOption>
                                <butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.CustomPlaybackRateLabel}">
                                    <TextBox Text="{Binding OptionsConfiguration.PlaybackRate, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}"  />
                                </butterflow_ui:ButterflowOption>
                            </StackPanel>
                        </butterflow_ui:ButterflowOption>
                        <butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.KeepAudioLabel}">
                            <CheckBox IsChecked="{Binding OptionsConfiguration.KeepAudio, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}" />
                        </butterflow_ui:ButterflowOption>
                        <butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.LosslessLabel}">
                            <CheckBox IsChecked="{Binding OptionsConfiguration.LosslessQuality, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}" />
                        </butterflow_ui:ButterflowOption>
                        <butterflow_ui:ButterflowOption LabelValue="{x:Static loc:Localization.ResolutionLabel}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <butterflow_ui:ButterflowOption Grid.Column="0" LabelValue="{x:Static loc:Localization.WidthLabel}">
                                    <TextBox Text="{Binding OptionsConfiguration.Width, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}, UpdateSourceTrigger=PropertyChanged}" />
                                </butterflow_ui:ButterflowOption>
                                <butterflow_ui:ButterflowOption Grid.Column="1" LabelValue="{x:Static loc:Localization.HeightLabel}">
                                    <TextBox Text="{Binding OptionsConfiguration.Height, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:MainWindow}}}"  />
                                </butterflow_ui:ButterflowOption>
                            </Grid>
                        </butterflow_ui:ButterflowOption>
                    </StackPanel>
                </ScrollViewer>
            </GroupBox>
            <GroupBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Header="{x:Static loc:Localization.AdvancedOptionsGroupBox}">
                <ScrollViewer>
                    <StackPanel>

                    </StackPanel>
                </ScrollViewer>
            </GroupBox>
            <MediaElement Grid.Row="1" Grid.RowSpan="2" Grid.Column="2" Grid.ColumnSpan="2" Name="mediaPreview" />
        </Grid>
    </DockPanel>
</Window>
