123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <ControlTemplate x:Key="ComboxItem" TargetType="{x:Type ComboBoxItem}">
- <Border
- Name="Bd"
- Padding="{TemplateBinding Control.Padding}"
- Background="{TemplateBinding Panel.Background}"
- BorderBrush="{TemplateBinding Border.BorderBrush}"
- BorderThickness="{TemplateBinding Border.BorderThickness}"
- SnapsToDevicePixels="True">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
- Content="{TemplateBinding ContentControl.Content}"
- ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="UIElement.IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelected" Value="False" />
- <Condition Property="UIElement.IsMouseOver" Value="True" />
- <Condition Property="UIElement.IsKeyboardFocused" Value="False" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Panel.Background" Value="#1F26A0DA" />
- <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#A826A0DA" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelected" Value="True" />
- <Condition Property="UIElement.IsMouseOver" Value="False" />
- <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Panel.Background" Value="#3D26A0DA" />
- <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelected" Value="True" />
- <Condition Property="UIElement.IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Panel.Background" Value="#1A477EDE" />
- <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelected" Value="True" />
- <Condition Property="UIElement.IsMouseOver" Value="False" />
- <Condition Property="UIElement.IsKeyboardFocused" Value="False" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Panel.Background" Value="#3DDADADA" />
- <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#DADADA" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelected" Value="False" />
- <Condition Property="UIElement.IsMouseOver" Value="False" />
- <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelected" Value="False" />
- <Condition Property="UIElement.IsMouseOver" Value="True" />
- <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Panel.Background" Value="#1A000000" />
- <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A000000" />
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <Style x:Key="ZoomComboxItemStyle" TargetType="ComboBoxItem">
- <Setter Property="Template" Value="{StaticResource ComboxItem}" />
- <Setter Property="Width" Value="224" />
- <Setter Property="Height" Value="32" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="FontFamily" Value="Segoe UI" />
- <Setter Property="FontSize" Value="14" />
- </Style>
- <Style x:Key="ContextMenuStyle" TargetType="{x:Type ContextMenu}">
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="Grid.IsSharedSizeScope" Value="true" />
- <Setter Property="HasDropShadow" Value="True" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ContextMenu}">
- <Border Uid="Border_93">
- <Border.Style>
- <Style TargetType="{x:Type Border}">
- <Setter Property="Tag" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="True">
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect
- BlurRadius="4"
- Opacity="0.8"
- ShadowDepth="1" />
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
- <Border
- Uid="Border_50"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ScrollViewer
- Uid="ScrollViewer_9"
- CanContentScroll="True"
- Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
- TypeInTargetAssembly={x:Type FrameworkElement}}}">
- <ItemsPresenter
- Uid="ItemsPresenter_5"
- KeyboardNavigation.DirectionalNavigation="Cycle"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </ScrollViewer>
- </Border>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|