diff options
author | sr55 <[email protected]> | 2016-06-16 20:41:00 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2016-06-16 20:41:00 +0100 |
commit | dab0d2e18d835006e90dbc6dbbffd1c7d2aa0b9d (patch) | |
tree | 6e99322a83337d829320d800f7c1d67f735cf7b4 /win/CS/HandBrakeWPF/Views/MainView.xaml | |
parent | 44a359d7d68a9c716df2927781ba144c22d0d285 (diff) |
WinGui: Make the "Presets" menu grouped by category.
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/MainView.xaml')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 12ef0cf96..ab812e7a3 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -19,6 +19,8 @@ <UserControl.Resources>
<Converters:BooleanConverter x:Key="booleanConverter" />
<Converters:EnumComboConverter x:Key="enumComboConverter" />
+ <Converters:PresetsMenuConverter x:Key="presetsMenuConverter"/>
+
<Style TargetType="Button">
@@ -100,20 +102,8 @@ <MenuItem Header="_Presets" x:Name="presetMenu" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}">
- <MenuItem Header="_Presets" ItemsSource="{Binding Presets}">
- <MenuItem.ItemContainerStyle>
- <Style TargetType="MenuItem">
- <Setter Property="Tag" Value="{Binding}" />
- <Setter Property="cal:Action.TargetWithoutContext" Value="{Binding DataContext, ElementName=presetMenu}"/>
- <Setter Property="cal:Message.Attach" Value="[Event Click] = [Action PresetSelect($this.Tag)]"/>
- <Style.Triggers>
- <DataTrigger Binding="{Binding IsDefault}" Value="True">
- <Setter Property="FontStyle" Value="Italic" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </MenuItem.ItemContainerStyle>
- </MenuItem>
+
+ <MenuItem Header="_Presets" ItemsSource="{Binding Presets, Converter={StaticResource presetsMenuConverter}}" />
<Separator />
<MenuItem Header="_Import from file" cal:Message.Attach="[Event Click] = [Action PresetImport]" />
<MenuItem Header="_Export to file" cal:Message.Attach="[Event Click] = [Action PresetExport]" />
|