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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
<UserControl x:Class="HandBrakeWPF.Views.AudioView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Audio="clr-namespace:HandBrakeWPF.Converters.Audio"
xmlns:cal="http://www.caliburnproject.org"
xmlns:Conveters="clr-namespace:HandBrakeWPF.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:splitButton="clr-namespace:HandBrakeWPF.Controls.SplitButton"
xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
d:DesignHeight="800"
d:DesignWidth="750"
mc:Ignorable="d"
x:Name="audioTab">
<UserControl.Resources>
<Conveters:EnumComboConverter x:Key="enumComboConverter" />
<Conveters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
<Conveters:BooleanToHiddenVisibilityConverter x:Key="boolToHiddenVisConverter" />
<Audio:AudioEncoderConverter x:Key="audioEncoderConverter" />
<Audio:AudioBehaviourConverter x:Key="audioBehaviourConverter" />
<Audio:AudioTrackDefaultBehaviourConverter x:Key="audioTrackDefaultBehaviourConverter" />
<Audio:AudioRateTypeConverter x:Key="audioRateTypeConverter" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Row 0 -->
<TextBlock Grid.Row="0"
Margin="10,5,0,0"
FontWeight="Bold"
VerticalAlignment="Top"
Text="{Binding PanelTitle}" />
<Button MinWidth="65" Grid.Row="0" Grid.Column="1"
Margin="0,5,10,0"
cal:Message.Attach="[Event Click] = [Action ShowAudioDefaults]"
Content="{Binding SwitchDisplayTitle}"
Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}}"
/>
<!-- Row 1 -->
<Grid Grid.Row="1" Margin="10,5,10,0" Grid.Column="0"
Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<splitButton:SplitMenuButton Content="{x:Static Properties:ResourcesUI.Shared_AddTrack}" cal:Message.Attach="[Event Click] = [Action Add]" FontWeight="Bold" Margin="0,0,10,0" Grid.Column="0">
<splitButton:SplitMenuButton.ItemSource>
<MenuItem Header="{x:Static Properties:ResourcesUI.Shared_AddNewTrack}" cal:Message.Attach="[Event Click] = [Action Add]" />
<MenuItem Header="{x:Static Properties:ResourcesUI.Shared_AddAllRemaining}" cal:Message.Attach="[Event Click] = [Action AddAllRemaining]" />
<MenuItem Header="{x:Static Properties:ResourcesUI.Shared_AddAllForSelected}" cal:Message.Attach="[Event Click] = [Action AddAllRemainingForSelectedLanguages]" />
</splitButton:SplitMenuButton.ItemSource>
</splitButton:SplitMenuButton>
<Button MinWidth="65" Grid.Column="1"
Margin="0,0,10,0"
cal:Message.Attach="[Event Click] = [Action Clear]"
Content="{x:Static Properties:ResourcesUI.Generic_Clear}" />
<Button MinWidth="65" Grid.Column="3"
Margin="0,0,10,0"
cal:Message.Attach="[Event Click] = [Action ShowAudioDefaults]"
Content="{Binding SwitchDisplayTitle}" />
<Button MinWidth="65" Grid.Column="4"
cal:Message.Attach="[Event Click] = [Action ReloadDefaults]"
Content="{x:Static Properties:ResourcesUI.AudioView_ReloadDefaults}" />
</Grid>
</Grid>
<!-- Row 2 -->
<ListBox Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch"
Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}"
Margin="10,10,10,10"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
ItemsSource="{Binding Task.AudioTracks}"
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.Shared_AddNewTrack}" cal:Message.Attach="[Event Click] = [Action Add]" />
<MenuItem Header="{x:Static Properties:ResourcesUI.Shared_AddAllRemaining}" cal:Message.Attach="[Event Click] = [Action AddAllRemaining]" />
<MenuItem Header="{x:Static Properties:ResourcesUI.Shared_AddAllForSelected}" cal:Message.Attach="[Event Click] = [Action AddAllRemainingForSelectedLanguages]" />
<Separator />
<MenuItem Header="{x:Static Properties:ResourcesUI.Generic_Clear}" cal:Message.Attach="[Event Click] = [Action Clear]" />
<Separator />
<MenuItem Header="{x:Static Properties:ResourcesUI.Shared_ConfigureDefaultBehaviours}" cal:Message.Attach="[Event Click] = [Action SetDefaultBehaviour]" />
</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" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<!-- Row 1 -->
<ComboBox Grid.Column="1" Height="22" Width="130" Margin="5,0,5,0" HorizontalAlignment="Stretch"
ItemsSource="{Binding DataContext.SourceTracks, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
SelectedItem="{Binding ScannedTrack}" />
<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}" />
<!-- Row 2 -->
<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.AudioMixdowns, Converter={StaticResource enumComboConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
SelectedItem="{Binding MixDown, Converter={StaticResource enumComboConverter}}"
Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
<ToggleButton Name="advancedOptionsToggle" VerticalAlignment="Center" Grid.Column="8" Grid.Row="0" Grid.ColumnSpan="2" Margin="5,0,0,0"
Padding="3,0" Height="22" HorizontalAlignment="Left" >
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Content" Value="Show"/>
<Setter Property="FontWeight" Value="Bold" />
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Content" Value="˄"/>
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter Property="Content" Value="˅" />
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
</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="Remove">
<cal:Parameter Value="{Binding}" />
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Image>
</StackPanel>
<!-- Hidden Row -->
<Grid Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Visibility="{Binding IsChecked, ElementName=advancedOptionsToggle, Converter={StaticResource boolToVisConverter}}">
<StackPanel Orientation="Horizontal" Margin="0,5,0,5" >
<TextBlock VerticalAlignment="Center" 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"
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}"
Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
<controls:NumberBox Name="drcNumericCtl" Width="45" Margin="5,0,5,0" HorizontalAlignment="Left"
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}"
Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
<controls:NumberBox Name="gainNumericCtl" Width="45" Margin="5,0,5,0" HorizontalAlignment="Left"
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}"/>
<TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackName}" VerticalAlignment="Center" FontWeight="Bold" Margin="5,0,5,0" />
<TextBox Text="{Binding TrackName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="138" Height="22" />
</StackPanel>
</Grid>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10,0,10,0"
Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false, FallbackValue=Visible}">
<Grid Margin="5,0,0,0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Audio -->
<TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackSelectionBehaviour}" Grid.Column="0" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
<ComboBox Name="autoAudioMode" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left"
ItemsSource="{Binding AudioBehaviourModeList, Converter={StaticResource audioBehaviourConverter}}"
SelectedItem="{Binding AudioBehaviours.SelectedBehaviour, Converter={StaticResource audioBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
<TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackSettingDefaultBehaviour}" Grid.Column="0" Grid.Row="1" Margin="0,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
<ComboBox Name="audioTrackBeahaviorMode" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left"
ItemsSource="{Binding AudioTrackDefaultBehaviourModeList, Converter={StaticResource audioTrackDefaultBehaviourConverter}}"
SelectedItem="{Binding AudioBehaviours.SelectedTrackDefaultBehaviour, Converter={StaticResource audioTrackDefaultBehaviourConverter}}" Width="210" Margin="0,5,5,0" />
</Grid>
<TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChooseLanguages}" Margin="5,10,0,0" />
<Grid Margin="20,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0">
<TextBlock Text="{x:Static Properties:ResourcesUI.Shared_AvailableLanguages}" Margin="0,0,0,5"/>
<ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}"
helpers:ListBoxHelper.SelectedItems="{Binding SelectedAvailableToMove}"
SelectionMode="Extended" Width="140" Height="120" />
</StackPanel>
<DockPanel Grid.Column="1" Margin="10,0,10,0">
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<Button Content="{x:Static Properties:ResourcesUI.Generic_MoveRight}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" MaxWidth="90" />
<Button Content="{x:Static Properties:ResourcesUI.Generic_MoveLeft}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" MaxWidth="90" />
<Button Content="{x:Static Properties:ResourcesUI.Generic_Clear}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="80"/>
</StackPanel>
</DockPanel>
<StackPanel Orientation="Vertical" Grid.Column="2">
<TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChosenLangages}" Margin="0,0,0,5"/>
<ListBox Name="selectedLangauges" ItemsSource="{Binding AudioBehaviours.SelectedLangauges}"
helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}"
SelectionMode="Extended" Width="140" Height="120"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
<TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_AutoPassthruBehaviour}" FontWeight="Bold" Margin="0,10,0,5" />
<StackPanel Margin="10,5,0,0"
Orientation="Vertical">
<TextBlock Margin="5,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_WhenAutoPassthru}" VerticalAlignment="Center" />
<TextBlock Margin="5,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_AllowPassThruOf}" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Margin="15,5,0,0"
Orientation="Horizontal">
<CheckBox Margin="0,0,5,0"
Content="MP3" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowMP3Pass}" />
<CheckBox Margin="0,0,5,0"
Content="AAC" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAACPass}" />
<CheckBox Margin="0,0,5,0"
Content="AC3" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAC3Pass}" />
<CheckBox Margin="0,0,5,0"
Content="E-AC3" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowEAC3Pass}" />
<CheckBox Margin="0,0,5,0"
Content="DTS" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSPass}" />
<CheckBox Margin="0,0,5,0"
Content="DTSHD" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSHDPass}" />
<CheckBox Margin="0,0,5,0"
Content="TrueHD" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowTrueHDPass}" />
<CheckBox Margin="0,0,5,0"
Content="FLAC" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowFlacPass}" />
<TextBlock Margin="15,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_OtherwiseFallbackEncoder}" />
<ComboBox VerticalAlignment="Center" Width="105" Height="22" Margin="5,0,5,0">
<ComboBox.SelectedItem>
<MultiBinding Converter="{StaticResource audioEncoderConverter}">
<Binding Path="Task.AllowedPassthruOptions.AudioEncoderFallback" />
</MultiBinding>
</ComboBox.SelectedItem>
<ComboBox.ItemsSource>
<MultiBinding Converter="{StaticResource audioEncoderConverter}" ConverterParameter="True">
<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>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
|