summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/MainView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-07-13 21:28:03 +0000
committersr55 <[email protected]>2012-07-13 21:28:03 +0000
commit2425840702b5e319165384f73a51874349ee6d84 (patch)
tree2e4868e7839f841a8127e2275577b7f797e15677 /win/CS/HandBrakeWPF/Views/MainView.xaml
parent252b183a32348050bbf9c23f3d70e9723db9271a (diff)
WinGui: Improve the code behind the taskbar source menu. Note, The Disc insert detection still isn't in place, so it will only show the initial available drives, it won't detect disc changes yet.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4828 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/MainView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml28
1 files changed, 24 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index 9efcf6dd7..7b78e50e3 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -5,7 +5,8 @@
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
- xmlns:behaviours="clr-namespace:HandBrakeWPF.Helpers" AllowDrop="True"
+ xmlns:behaviours="clr-namespace:HandBrakeWPF.Helpers" xmlns:Model="clr-namespace:HandBrakeWPF.Model"
+ AllowDrop="True"
Background="#FFF0F0F0"
FontSize="11"
Micro:Message.Attach="[Event Loaded] = [Action Load]"
@@ -41,7 +42,6 @@
<Setter Property="Padding" Value="5,5" />
</Style>
-
<CollectionViewSource x:Key="presetsCvs" Source="{Binding Presets}">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="Category" />
@@ -87,6 +87,7 @@
</Style>
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+
</UserControl.Resources>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
@@ -158,7 +159,7 @@
ToolBarTray.IsLocked="True"
>
<Menu Background="Transparent">
- <MenuItem ItemsSource="{Binding SourceToolbarMenu}">
+ <MenuItem ItemsSource="{Binding SourceMenu}">
<MenuItem.Header>
<StackPanel Orientation="Horizontal">
<Image Width="32"
@@ -171,6 +172,25 @@
/>
</StackPanel>
</MenuItem.Header>
+ <MenuItem.ItemContainerStyle>
+ <Style TargetType="{x:Type MenuItem}">
+ <Setter Property="Header" Value="{Binding Text}" />
+ <Setter Property="MenuItem.Command" Value="{Binding Command}"/>
+ <Setter Property="MenuItem.CommandParameter" Value="123"/>
+ <Setter Property="ItemsSource" Value="{Binding Children}" />
+ <Setter Property="Icon" Value="{Binding Image}" />
+ </Style>
+ </MenuItem.ItemContainerStyle>
+ <!--<HierarchicalDataTemplate DataType="{x:Type Model:SourceMenuItem}"
+ ItemsSource="{Binding Path=Children}">
+ <HierarchicalDataTemplate.ItemContainerStyle>
+ <Style TargetType="MenuItem">
+ <Setter Property="Command" Value="{Binding Command}" />
+ <Setter Property="Icon" Value="{Binding Image}" />
+ </Style>
+ </HierarchicalDataTemplate.ItemContainerStyle>
+ <TextBlock Text="{Binding Text}" />
+ </HierarchicalDataTemplate>-->
</MenuItem>
</Menu>
@@ -530,7 +550,7 @@
SelectedItem="{Binding SelectedPreset, Mode=TwoWay}" BorderThickness="0,0,0,1"
BorderBrush="LightGray"
>
-
+
<ListBox.GroupStyle>
<GroupStyle ContainerStyle="{StaticResource ContainerStyle}"/>
</ListBox.GroupStyle>