diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml | 161 |
1 files changed, 159 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml index b5d2f70a6..92844326e 100644 --- a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml @@ -9,8 +9,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers" xmlns:Properties="clr-namespace:HandBrakeWPF.Properties" - d:DesignHeight="360" - d:DesignWidth="770" + xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" + xmlns:controls="clr-namespace:HandBrakeWPF.Controls" + d:DesignHeight="450" + d:DesignWidth="800" mc:Ignorable="d" x:Name="audioDefaultsTab"> @@ -19,8 +21,12 @@ <Audio:AudioEncoderConverter x:Key="audioEncoderConverter" /> <Audio:AudioBehaviourConverter x:Key="audioBehaviourConverter" /> <Audio:AudioTrackDefaultBehaviourConverter x:Key="audioTrackDefaultBehaviourConverter" /> + <Conveters:BooleanToHiddenVisibilityConverter x:Key="boolToHiddenVisConverter" /> + <Audio:AudioRateTypeConverter x:Key="audioRateTypeConverter" /> + <Audio:AudioMixdownConverter x:Key="audioMixdownConverter" /> </UserControl.Resources> + <Grid VerticalAlignment="Top"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> @@ -155,6 +161,157 @@ </StackPanel> + + <!-- Row 2 --> + <TextBlock Text="Automatically add Tracks" FontWeight="Bold" Margin="0,10,0,5" /> + <StackPanel Orientation="Horizontal"> + <Button Content="Add Track" cal:Message.Attach="[Event Click] = [Action AddTrack]" Margin="10,0,10,0" Padding="8,2"/> + <Button Content="Clear" cal:Message.Attach="[Event Click] = [Action ClearTracks]" Padding="8,2"/> + </StackPanel> + + <ListBox VerticalAlignment="Stretch" MinHeight="50" + Margin="10,10,10,10" + dd:DragDrop.DropHandler="{Binding}" + dd:DragDrop.IsDragSource="True" + dd:DragDrop.IsDropTarget="True" + ItemsSource="{Binding BehaviourTracks}" + SelectionMode="Extended"> + + <ListBox.ItemContainerStyle> + <Style TargetType="ListBoxItem"> + <Setter Property="HorizontalContentAlignment" Value="Stretch" /> + <Setter Property="Margin" Value="0,0,0,1" /> + </Style> + </ListBox.ItemContainerStyle> + + <ListBox.ContextMenu> + <ContextMenu> + <MenuItem Header="{x:Static Properties:ResourcesUI.Generic_Clear}" cal:Message.Attach="[Event Click] = [Action ClearTracks]" /> + </ContextMenu> + </ListBox.ContextMenu> + + <ListBox.ItemTemplate> + <DataTemplate> + + <Grid HorizontalAlignment="Stretch"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="*" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + + <!-- Marker --> + <!--<Image Grid.Column="0" Grid.Row="0" + Width="16" + Height="16" + Margin="8,0,8,0" + Source="Images/Movies.png" />--> + + <!-- Settings --> + <Grid Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,5,0,5"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto"/> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + + <Grid.RowDefinitions> + <RowDefinition Height="28" /> + </Grid.RowDefinitions> + + <!-- Row 1 --> + <TextBlock Grid.Column="2" VerticalAlignment="Center" FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.AudioView_Codec}" /> + <ComboBox Grid.Column="3" Width="100" Height="22" Margin="5,0,5,0"> + <ComboBox.SelectedItem> + <MultiBinding Converter="{StaticResource audioEncoderConverter}"> + <Binding Path="Encoder" /> + </MultiBinding> + </ComboBox.SelectedItem> + <ComboBox.ItemsSource> + <MultiBinding Converter="{StaticResource audioEncoderConverter}"> + <Binding Path="DataContext.AudioEncoders" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" /> + <Binding Path="DataContext.Task" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" /> + </MultiBinding> + </ComboBox.ItemsSource> + </ComboBox> + + <ComboBox Grid.Column="4" Height="22" Width="65" HorizontalAlignment="Stretch" + ItemsSource="{Binding AudioEncoderRateTypes, Converter={StaticResource audioRateTypeConverter}}" + SelectedItem="{Binding EncoderRateType, Converter={StaticResource audioRateTypeConverter}}" + Visibility="{Binding IsRateTypeVisible, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" /> + + <ComboBox Grid.Column="5" Width="55" Height="22" Margin="5,0,5,0" ItemsSource="{Binding EncoderQualityValues}" + SelectedItem="{Binding Quality}" + Visibility="{Binding IsQualityVisible, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" /> + + <ComboBox Grid.Column="5" Width="55" Height="22" Margin="5,0,5,0" ItemsSource="{Binding Bitrates}" + SelectedItem="{Binding Bitrate}" + Visibility="{Binding IsBitrateVisible, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" /> + + <TextBlock Grid.Row="0" Grid.Column="6" VerticalAlignment="Center" FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.AudioView_Mixdown}" + Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" /> + <ComboBox Grid.Row="0" Grid.Column="7" Height="22" Width="120" Margin="5,0,5,0" HorizontalAlignment="Stretch" + ItemsSource="{Binding DataContext.Mixdowns, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" + SelectedItem="{Binding MixDown}" + DisplayMemberPath="DisplayName" + Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" /> + + + <TextBlock VerticalAlignment="Center" Grid.Column="8" FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.AudioView_Samplerate}" + Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" /> + <ComboBox Width="70" Height="22" Margin="5,0,5,0" Grid.Column="9" + ItemsSource="{Binding DataContext.SampleRates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" + SelectedItem="{Binding SampleRateDisplayValue}" + Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" /> + + <TextBlock VerticalAlignment="Center" FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.AudioView_DRC}" Grid.Column="10" + Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" /> + <controls:NumberBox Name="drcNumericCtl" Width="45" Margin="5,0,5,0" HorizontalAlignment="Left" Grid.Column="11" + Minimum="0" Modulus="0.1" Maximum="4" Number="{Binding DRC, Mode=TwoWay}" UpdateBindingOnTextChange="True" ShowIncrementButtons="True" AllowEmpty="False" + Visibility="{Binding IsPassthru, Converter={StaticResource boolToHiddenVisConverter}, ConverterParameter=true}"/> + + <TextBlock VerticalAlignment="Center" FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.AudioView_Gain}" Grid.Column="12" + Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" /> + <controls:NumberBox Name="gainNumericCtl" Width="45" Margin="5,0,5,0" HorizontalAlignment="Left" Grid.Column="13" + Minimum="-20" Modulus="1" Maximum="20" Number="{Binding Gain, Mode=TwoWay}" UpdateBindingOnTextChange="True" ShowIncrementButtons="True" AllowEmpty="False" + Visibility="{Binding IsPassthru, Converter={StaticResource boolToHiddenVisConverter}, ConverterParameter=true}"/> + + </Grid> + + <!-- Delete --> + <StackPanel Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"> + <Image Width="16" Height="16" Margin="10,0,10,0" Source="Images/delete.png"> + <i:Interaction.Triggers> + <i:EventTrigger EventName="MouseDown"> + <cal:ActionMessage MethodName="RemoveTrack"> + <cal:Parameter Value="{Binding}" /> + </cal:ActionMessage> + </i:EventTrigger> + </i:Interaction.Triggers> + </Image> + </StackPanel> + + </Grid> + + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + </StackPanel> |