summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/AdvancedView.xaml
blob: 3fad3c54b7feb5db9eb45419ae69880b10979470 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<UserControl x:Class="HandBrakeWPF.Views.AdvancedView"
             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" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             x:Name="advancedView">
    <UserControl.Resources>
        <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
        <Converters:EnumComboConverter x:Key="x264DisplayConverter" />
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <TextBlock Text="Advanced" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>

        <Grid Grid.Row="1" Margin="10,10,0,0" Visibility="{Binding DisplayX264Options, Converter={StaticResource boolToVisConverter}}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <StackPanel Grid.Row="0" Orientation="Vertical" Margin="0,0,0,10">

                <TextBlock Text="X264 Advanced Options:" Margin="0,0,0,5" FontWeight="Bold" VerticalAlignment="Center" />
                
                <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,10">
                    <TextBlock Text="Preset:" VerticalAlignment="Center" />
                    <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
                          ItemsSource="{Binding X264Presets, Converter={StaticResource x264DisplayConverter}}" 
                          SelectedItem="{Binding X264Preset, Converter={StaticResource x264DisplayConverter}}"/>

                    <TextBlock Text="Profile:" VerticalAlignment="Center" />
                    <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
                          ItemsSource="{Binding X264Profiles, Converter={StaticResource x264DisplayConverter}}" 
                          SelectedItem="{Binding X264Profile, Converter={StaticResource x264DisplayConverter}}"/>


                    <TextBlock Text="Tune:" VerticalAlignment="Center" />
                    <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
                          ItemsSource="{Binding X264Tunes, Converter={StaticResource x264DisplayConverter}}" 
                          SelectedItem="{Binding X264Tune, Converter={StaticResource x264DisplayConverter}}"/>
                </StackPanel>
            </StackPanel>

        </Grid>

        <StackPanel Grid.Row="2" Margin="10" Height="100" VerticalAlignment="Top" >
            <TextBlock Text="Advanced Query" Margin="0,0,0,5" FontWeight="Bold" VerticalAlignment="Center" />
            <TextBox Text="{Binding Query}" 
                 VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="150" TextWrapping="Wrap" />
        </StackPanel>

    </Grid>
</UserControl>