summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/AudioView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-05-01 00:13:20 +0000
committersr55 <[email protected]>2012-05-01 00:13:20 +0000
commit4b99eac923d164a5a7e726370dbdb04324fea3da (patch)
treef40bce36d72e4877a8a924c79d41c94c3b835c6e /win/CS/HandBrakeWPF/Views/AudioView.xaml
parent247470bf6e6b0582cbedbc05bca11a67b973d7c1 (diff)
WinGui: (WPF) Improvements to the new audio panel.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4614 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/AudioView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioView.xaml35
1 files changed, 23 insertions, 12 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml
index 450d463e5..c8d3ba88e 100644
--- a/win/CS/HandBrakeWPF/Views/AudioView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml
@@ -12,6 +12,7 @@
<UserControl.Resources>
<Conveters:EnumComboConverter x:Key="enumComboConverter" />
<Conveters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Conveters:BooleanToHiddenVisibilityConverter x:Key="boolToHiddenVisConverter" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
@@ -103,29 +104,39 @@
ItemsSource="{Binding DataContext.AudioEncoders, Converter={StaticResource enumComboConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
SelectedItem="{Binding Encoder, Converter={StaticResource enumComboConverter}}"/>
- <TextBlock Text="Bitrate" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center" />
+ <TextBlock Text="Bitrate" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
<ComboBox Width="70" Grid.Column="5" Margin="5,0,5,0" Height="22"
ItemsSource="{Binding DataContext.AudioBitrates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding Bitrate}"/>
+ SelectedItem="{Binding Bitrate}" IsEnabled="{Binding}"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
- <TextBlock Text="Samplerate" FontWeight="Bold" Grid.Column="6" VerticalAlignment="Center" />
+ <TextBlock Text="Samplerate" FontWeight="Bold" Grid.Column="6" VerticalAlignment="Center"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
<ComboBox Width="70" Grid.Column="7" Margin="5,0,5,0" Height="22"
ItemsSource="{Binding DataContext.SampleRates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding SampleRateDisplayValue}"/>
+ SelectedItem="{Binding SampleRateDisplayValue}"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
<!-- Row 2-->
- <TextBlock Text="Mixdown" FontWeight="Bold" Grid.Column="0" Grid.Row="1" VerticalAlignment="Center"/>
+ <TextBlock Text="Mixdown" FontWeight="Bold" Grid.Column="0" Grid.Row="1" VerticalAlignment="Center"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
<ComboBox Width="100" Grid.Column="1" Margin="5,0,5,0" Grid.Row="1" Height="22"
ItemsSource="{Binding DataContext.AudioMixdowns, Converter={StaticResource enumComboConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding MixDown, Converter={StaticResource enumComboConverter}}"/>
+ SelectedItem="{Binding MixDown, Converter={StaticResource enumComboConverter}}"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
- <TextBlock Text="DRC" FontWeight="Bold" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding DRC, Mode=TwoWay}" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Left" Margin="5,0,5,0"
- Minimum="0" Maximum="4" DecimalPlace="1" LargeChange="0.1" SmallChange="0.1"/>
+ <TextBlock Text="DRC" FontWeight="Bold" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
+ <NumericUpDown:NumericUpDown Name="drcNumericCtl" Width="45" Value="{Binding DRC, Mode=TwoWay}" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Left" Margin="5,0,5,0"
+ Minimum="0" Maximum="4" DecimalPlace="1" LargeChange="0.1" SmallChange="0.1"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToHiddenVisConverter}, ConverterParameter=true}" />
- <TextBlock Text="Gain" FontWeight="Bold" Grid.Column="4" Grid.Row="1" VerticalAlignment="Center"/>
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding Gain, Mode=TwoWay}" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Left" Margin="5,0,5,0"
- Minimum="-20" Maximum="20" DecimalPlace="0" SmallChange="1" LargeChange="1" />
+ <TextBlock Text="Gain" FontWeight="Bold" Grid.Column="4" Grid.Row="1" VerticalAlignment="Center"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
+ <NumericUpDown:NumericUpDown Name="gainNumericCtl" Width="45" Value="{Binding Gain, Mode=TwoWay}" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Left" Margin="5,0,5,0"
+ Minimum="-20" Maximum="20" DecimalPlace="0" SmallChange="1" LargeChange="1"
+ Visibility="{Binding IsPassthru, Converter={StaticResource boolToHiddenVisConverter}, ConverterParameter=true}"/>
</Grid>