123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:customControl="clr-namespace:PDF_Office.CustomControl"
- >
- <Style x:Key="FocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="0"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="0" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- set SelectedBackgroundColor to Transparent when you do not need the background in selected items -->
- <Color x:Key="SelectedBackgroundColor">LightBlue</Color>
- <Color x:Key="SelectedUnfocusedColor">AliceBlue</Color>
- <!-- set the MouseOverColor to Transparent when you do not need the effect in the unselected items -->
- <Color x:Key="MouseOverColor">LightBlue</Color>
- <SolidColorBrush x:Key="Item.MouseOver.Background"
- Color="LightBlue" />
- <SolidColorBrush x:Key="Item.MouseOver.Border"
- Color="LightBlue" />
- <SolidColorBrush x:Key="Item.SelectedInactive.Background"
- Color="AliceBlue" />
- <SolidColorBrush x:Key="Item.SelectedInactive.Border"
- Color="AliceBlue" />
- <SolidColorBrush x:Key="Item.SelectedActive.Background"
- Color="Beige" />
- <SolidColorBrush x:Key="Item.SelectedActive.Border"
- Color="Beige" />
- <Style x:Key="ListBoxItemStyle"
- TargetType="{x:Type customControl:ListItemQuickTool}">
- <Setter Property="SnapsToDevicePixels"
- Value="True" />
- <Setter Property="FocusVisualStyle"
- Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type customControl:ListItemQuickTool}">
- <Border x:Name="Border"
- Margin="0,0,0,16"
- BorderThickness="1"
- Background="Transparent"
- SnapsToDevicePixels="true">
- <Border.BorderBrush>
- <SolidColorBrush Color="#000000" Opacity="0.05"/>
- </Border.BorderBrush>
- <ContentPresenter />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsOverModular"
- Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Border"
- Property="Background"
- Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="Border"
- Property="BorderBrush"
- Value="{StaticResource Item.MouseOver.Border}" />
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers />
- </Style>
- <Style x:Key="MoreListBoxItemStyle"
- TargetType="{x:Type customControl:ListItemQuickTool}">
- <Setter Property="SnapsToDevicePixels"
- Value="True" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type customControl:ListItemQuickTool}">
- <Border x:Name="Border" CornerRadius="4" Margin="0,0,0,16" BorderThickness="1"
- Background="Transparent"
- SnapsToDevicePixels="False">
- <Border.BorderBrush>
- <SolidColorBrush Color="#000000" Opacity="0.05"/>
- </Border.BorderBrush>
- <ContentPresenter />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected"
- Value="true" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="Border"
- Property="Background"
- Value="LightGoldenrodYellow" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|