1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <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>
- </ResourceDictionary>
|