diff options
author | sr55 <[email protected]> | 2012-01-08 15:09:40 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-01-08 15:09:40 +0000 |
commit | 54e6a851ccec4be58087f8d90d4e04fb2623b4b5 (patch) | |
tree | f4d603eeb208ab9c5e09b74d81e8a01823da701b /win/CS/HandBrakeWPF/Views/VideoView.xaml | |
parent | 4eebc527c8183ec0bbc905da7f648e004f44d9db (diff) |
WinGui: (WPF) Further work on hooking up the various tabs on the Main Window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4404 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/VideoView.xaml')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/VideoView.xaml | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index d06255b71..ada69e02e 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -2,8 +2,14 @@ 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"
- mc:Ignorable="d" >
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" mc:Ignorable="d" >
+
+ <UserControl.Resources>
+ <Converters:BooleanConverter x:Key="boolConverter" />
+ <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ </UserControl.Resources>
+
<Grid Margin="10,5,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -23,16 +29,16 @@ <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
<TextBlock Text="Video Codec:" Width="100" />
- <ComboBox Width="120"/>
+ <ComboBox Width="120" ItemsSource="{Binding VideoEncoders}" SelectedItem="{Binding SelectedVideoEncoder}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Franerate (FPS):" Width="100"/>
<StackPanel Orientation="Vertical">
- <ComboBox Width="120" />
- <RadioButton Content="Constant Framerate" />
- <RadioButton Content="Variable Framerate" />
- <RadioButton Content="Peak Framerate" />
+ <ComboBox Width="120" ItemsSource="{Binding Framerates}" SelectedItem="{Binding SelectedFramerate}" />
+ <RadioButton Content="Constant Framerate" IsChecked="{Binding IsConstantFramerate}" />
+ <RadioButton Content="Variable Framerate" IsChecked="{Binding IsVariableFramerate}" Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+ <RadioButton Content="Peak Framerate" IsChecked="{Binding IsPeakFramerate}" Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
</StackPanel>
</StackPanel>
</StackPanel>
@@ -42,21 +48,24 @@ <TextBlock Text="Quality" FontWeight="Bold" Margin="0,0,0,10"/>
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
- <RadioButton Content="Constant Quality:" Margin="0,0,10,0"/>
- <TextBlock Text="0" Width="25" />
+ <RadioButton Content="Constant Quality:" IsChecked="{Binding IsConstantQuantity}" Margin="0,0,10,0"/>
+ <TextBlock Text="{Binding RF}" Width="25" />
<TextBlock Text="RF" FontWeight="Bold" />
</StackPanel>
- <Slider Width="240" Margin="0,0,0,20" />
+ <Slider Width="240" Value="{Binding RF}" Maximum="{Binding QualityMax}" Minimum="{Binding QualityMin}"
+ IsEnabled="{Binding IsConstantQuantity}" Margin="0,0,0,20" />
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
- <RadioButton Content="Avg Bitrate (kbps):" Margin="0,0,10,0"/>
- <TextBox Width="75" />
+ <RadioButton Content="Avg Bitrate (kbps):" IsChecked="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,10,0"/>
+ <TextBox Width="75" Text="{Binding AverageBitrate}" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="30,0,0,0">
- <CheckBox Content="2-Pass Encoding" Margin="0,0,10,0" />
- <CheckBox Content="Turbo first pass" />
+ <CheckBox Content="2-Pass Encoding" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
+ IsChecked="{Binding IsTwoPass}" Margin="0,0,10,0" />
+ <CheckBox Content="Turbo first pass" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
+ IsChecked="{Binding IsTurboFirstPass}" />
</StackPanel>
</StackPanel>
|