123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Style x:Key="Main_MenuItem" TargetType="MenuItem">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type MenuItem}">
- <Border x:Name="border" Background="#FFFFFF" BorderThickness="0" Height="30">
- <Grid Margin="20,0,20,0">
- <ContentPresenter x:Name="contentPresenter"
- ContentSource="Header"
- TextBlock.Foreground="#000000"
- TextBlock.FontFamily="SegoeUI"
- TextBlock.FontSize="15"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- </ContentPresenter>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
- <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
- </Trigger>
- <Trigger Property="IsHighlighted" Value="True">
- <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="Dropdown_MenuItem" TargetType="MenuItem">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type MenuItem}">
- <Border x:Name="border"
- Background="#FFFFFF"
- BorderThickness="0"
- Height="40">
- <Grid>
- <ContentPresenter x:Name="contentPresenter"
- ContentSource="Header"
- TextBlock.Foreground="#000000"
- TextBlock.FontFamily="SegoeUI"
- TextBlock.FontSize="15"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Margin="20,0,20,0">
- </ContentPresenter>
- <Popup x:Name="Part_Popup"
- AllowsTransparency="True"
- IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
- Placement="Bottom"
- PopupAnimation="Fade">
- <Border Name="SubMenuBorder"
- Background="#484546"
- BorderBrush="#484546">
- <ScrollViewer x:Name="SubMenuScrollViewer" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
- <Grid RenderOptions.ClearTypeHint="Enabled">
- <Canvas HorizontalAlignment="Left" VerticalAlignment="Top"></Canvas>
- <ItemsPresenter x:Name="ItemsPresenter"></ItemsPresenter>
- </Grid>
- </ScrollViewer>
- </Border>
- </Popup>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
- <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
- </Trigger>
- <Trigger Property="IsSuspendingPopupAnimation"
- Value="True">
- <Setter Property="PopupAnimation"
- TargetName="Part_Popup"
- Value="None"></Setter>
- </Trigger>
- <Trigger Property="IsHighlighted" Value="True">
- <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="Sub_MenuItem" TargetType="MenuItem">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type MenuItem}">
- <Border x:Name="border"
- Background="#FFFFFF"
- BorderThickness="0"
- Height="40" >
- <Grid Margin="20,0,20,0">
- <ContentPresenter x:Name="contentPresenter"
- ContentSource="Header"
- TextBlock.Foreground="#000000"
- TextBlock.FontFamily="SegoeUI"
- TextBlock.FontSize="15"
- HorizontalAlignment="Left"
- VerticalAlignment="Center">
- </ContentPresenter>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
- <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
- </Trigger>
- <Trigger Property="IsHighlighted" Value="True">
- <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="Sub_Dropdown_MenuItem" TargetType="MenuItem">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type MenuItem}">
- <Border x:Name="border"
- Background="#FFFFFF"
- BorderThickness="0"
- Height="40">
- <Grid Margin="20,0,0,0">
- <ContentPresenter x:Name="contentPresenter"
- ContentSource="Header"
- TextBlock.Foreground="#000000"
- TextBlock.FontFamily="SegoeUI"
- TextBlock.FontSize="15"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- >
- </ContentPresenter>
- <Popup x:Name="Part_Popup"
- AllowsTransparency="True"
- IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
- Placement="Right"
- PopupAnimation="Fade">
- <Border Name="SubMenuBorder"
- Background="#484546"
- BorderBrush="#FFFFFF">
- <ScrollViewer x:Name="SubMenuScrollViewer" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
- <Grid RenderOptions.ClearTypeHint="Enabled">
- <Canvas HorizontalAlignment="Left" VerticalAlignment="Top"></Canvas>
- <ItemsPresenter x:Name="ItemsPresenter"></ItemsPresenter>
- </Grid>
- </ScrollViewer>
- </Border>
- </Popup>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
- <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
- </Trigger>
- <Trigger Property="IsHighlighted" Value="True">
- <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="Dropdown_Sub_MenuItem" TargetType="MenuItem">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type MenuItem}">
- <Border x:Name="border"
- Background="#FFFFFF"
- BorderThickness="0"
- Height="40">
- <Grid Margin="20,0,20,0">
- <ContentPresenter x:Name="contentPresenter"
- ContentSource="Header"
- TextBlock.Foreground="#000000"
- TextBlock.FontFamily="SegoeUI"
- TextBlock.FontSize="15"
- HorizontalAlignment="Left"
- VerticalAlignment="Center">
- </ContentPresenter>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
- <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
- </Trigger>
- <Trigger Property="IsHighlighted" Value="True">
- <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
- <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|