CHG Reformatting.

git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@186 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
Philipp Sumi
2013-11-17 23:43:26 +00:00
parent f756fcc8a3
commit 0c1a07b6f3

View File

@@ -1,24 +1,33 @@
<ResourceDictionary <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Commands="clr-namespace:Samples.Commands" xmlns:Commands="clr-namespace:Samples.Commands"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar">
> <LinearGradientBrush x:Key="MenuBackground"
<LinearGradientBrush x:Key="MenuBackground" EndPoint="0.5,1" StartPoint="0.5,0"> EndPoint="0.5,1"
<GradientStop Color="#FFFFD892" Offset="1"/> StartPoint="0.5,0">
<GradientStop Color="#FFFFF3DD" Offset="0.259"/> <GradientStop Color="#FFFFD892"
Offset="1" />
<GradientStop Color="#FFFFF3DD"
Offset="0.259" />
</LinearGradientBrush> </LinearGradientBrush>
<Style TargetType="{x:Type ContextMenu}"> <Style TargetType="{x:Type ContextMenu}">
<Setter Property="BorderThickness" Value="1,1,1,1"/> <Setter Property="BorderThickness"
Value="1,1,1,1" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}"> <ControlTemplate TargetType="{x:Type ContextMenu}">
<Grid> <Grid>
<Border Background="{DynamicResource MenuBackground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Border Background="{DynamicResource MenuBackground}"
<ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" Uid="ScrollViewer_9" CanContentScroll="True"> BorderBrush="{TemplateBinding BorderBrush}"
<ItemsPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Cycle"/> BorderThickness="{TemplateBinding BorderThickness}">
<ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}"
Uid="ScrollViewer_9"
CanContentScroll="True">
<ItemsPresenter Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
KeyboardNavigation.DirectionalNavigation="Cycle" />
</ScrollViewer> </ScrollViewer>
</Border> </Border>
</Grid> </Grid>
@@ -33,27 +42,22 @@
The "shared" directive is needed if we reopen the sample window a few times - WPF will otherwise The "shared" directive is needed if we reopen the sample window a few times - WPF will otherwise
reuse the same context menu (which is a resource) again (which will have its DataContext set to the old TaskbarIcon) reuse the same context menu (which is a resource) again (which will have its DataContext set to the old TaskbarIcon)
--> -->
<ContextMenu <ContextMenu x:Shared="false"
x:Shared="false"
x:Key="tbMenu"> x:Key="tbMenu">
<MenuItem <MenuItem IsEnabled="False"
IsEnabled="False"
Header="{Binding Path=ToolTipText}"> Header="{Binding Path=ToolTipText}">
<MenuItem.Icon> <MenuItem.Icon>
<Image <Image Width="16"
Width="16"
Height="16" Height="16"
Source="{Binding Path=IconSource}" /> Source="{Binding Path=IconSource}" />
</MenuItem.Icon> </MenuItem.Icon>
</MenuItem> </MenuItem>
<MenuItem <MenuItem Header="Show Showcase Window"
Header="Show Showcase Window"
Command="{Commands:ShowSampleWindowCommand}" Command="{Commands:ShowSampleWindowCommand}"
CommandParameter="{Binding}"> CommandParameter="{Binding}">
<MenuItem.Icon> <MenuItem.Icon>
<Image <Image Width="16"
Width="16"
Height="16" Height="16"
Source="/Images/Add.png" /> Source="/Images/Add.png" />
</MenuItem.Icon> </MenuItem.Icon>
@@ -61,13 +65,11 @@
<Separator /> <Separator />
<MenuItem <MenuItem Header="Hide Showcase Window"
Header="Hide Showcase Window"
Command="{Commands:HideSampleWindowCommand}" Command="{Commands:HideSampleWindowCommand}"
CommandParameter="{Binding}"> CommandParameter="{Binding}">
<MenuItem.Icon> <MenuItem.Icon>
<Image <Image Width="16"
Width="16"
Height="16" Height="16"
Source="/Images/Remove.png" /> Source="/Images/Remove.png" />
</MenuItem.Icon> </MenuItem.Icon>