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,78 +1,80 @@
<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"
> EndPoint="0.5,1"
<LinearGradientBrush x:Key="MenuBackground" EndPoint="0.5,1" StartPoint="0.5,0"> StartPoint="0.5,0">
<GradientStop Color="#FFFFD892" Offset="1"/> <GradientStop Color="#FFFFD892"
<GradientStop Color="#FFFFF3DD" Offset="0.259"/> Offset="1" />
</LinearGradientBrush> <GradientStop Color="#FFFFF3DD"
Offset="0.259" />
</LinearGradientBrush>
<Style TargetType="{x:Type ContextMenu}"> <Style TargetType="{x:Type ContextMenu}">
<Setter Property="BorderThickness" Value="1,1,1,1"/> <Setter Property="BorderThickness"
<Setter Property="Template"> Value="1,1,1,1" />
<Setter.Value> <Setter Property="Template">
<ControlTemplate TargetType="{x:Type ContextMenu}"> <Setter.Value>
<Grid> <ControlTemplate TargetType="{x:Type ContextMenu}">
<Border Background="{DynamicResource MenuBackground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Grid>
<ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" Uid="ScrollViewer_9" CanContentScroll="True"> <Border Background="{DynamicResource MenuBackground}"
<ItemsPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Cycle"/> BorderBrush="{TemplateBinding BorderBrush}"
</ScrollViewer> BorderThickness="{TemplateBinding BorderThickness}">
</Border> <ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}"
</Grid> Uid="ScrollViewer_9"
</ControlTemplate> CanContentScroll="True">
</Setter.Value> <ItemsPresenter Margin="{TemplateBinding Padding}"
</Setter> SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
</Style> KeyboardNavigation.DirectionalNavigation="Cycle" />
</ScrollViewer>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- The taskbar context menu - the first row is a dummy to show off simple data binding --> <!-- The taskbar context menu - the first row is a dummy to show off simple data binding -->
<!-- <!--
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 IsEnabled="False"
<MenuItem Header="{Binding Path=ToolTipText}">
IsEnabled="False" <MenuItem.Icon>
Header="{Binding Path=ToolTipText}"> <Image Width="16"
<MenuItem.Icon> Height="16"
<Image Source="{Binding Path=IconSource}" />
Width="16" </MenuItem.Icon>
Height="16" </MenuItem>
Source="{Binding Path=IconSource}" />
</MenuItem.Icon>
</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 Width="16"
<Image Height="16"
Width="16" Source="/Images/Add.png" />
Height="16" </MenuItem.Icon>
Source="/Images/Add.png" /> </MenuItem>
</MenuItem.Icon>
</MenuItem>
<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 Width="16"
<Image Height="16"
Width="16" Source="/Images/Remove.png" />
Height="16" </MenuItem.Icon>
Source="/Images/Remove.png" /> </MenuItem>
</MenuItem.Icon> </ContextMenu>
</MenuItem>
</ContextMenu>
</ResourceDictionary> </ResourceDictionary>