12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <!-- 用于页面编辑的Item样式 -->
- <ControlTemplate x:Key="ListBoxItemControlTemplate" TargetType="{x:Type ListBoxItem}">
- <Border
- x:Name="Bd"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="True">
- <ContentPresenter
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <!--<MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="#1A000000" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="False" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- -->
- <!--<Setter TargetName="Bd" Property="Background" Value="#1A477EDE" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />-->
- <!--
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- -->
- <!--<Setter TargetName="Bd" Property="Background" Value="#1A477EDE" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />-->
- <!--
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>-->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <ControlTemplate x:Key="EditToolsItemControlTemplate" TargetType="{x:Type ListBoxItem}">
- <Border x:Name="EditToolsBorder"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- Height="{TemplateBinding Height}"
- Width="{TemplateBinding Width}"
- SnapsToDevicePixels="True"
- >
- <ContentPresenter
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True"></Condition>
- </MultiTrigger.Conditions>
- <Setter Property="Background" TargetName="EditToolsBorder" Value="#1A477EDE"/>
- <Setter Property="BorderBrush" TargetName="EditToolsBorder" Value="Black"/>
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True"/>
- <Condition Property="IsSelected" Value="True"/>
- </MultiTrigger.Conditions>
- <Setter Property="Background" TargetName="EditToolsBorder" Value="#1A477EDE"/>
- <Setter Property="BorderBrush" TargetName="EditToolsBorder" Value="Black"/>
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="TextElement.Foreground" TargetName="EditToolsBorder" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </ResourceDictionary>
|