123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <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}"
- CornerRadius="{StaticResource border-radius.4}"
- FocusVisualStyle="{x:Null}"
- SnapsToDevicePixels="True">
- <ContentPresenter
- Margin="16,8"
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- FocusVisualStyle="{x:Null}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="Transparent" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.sys.border.accent.lv2}" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="False" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.sys.border.accent.lv2}" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.sys.border.accent.lv2}" />
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <!-- 用于BOTA Thunmbnail的Item样式 -->
- <ControlTemplate x:Key="BOTAListBoxItemTemplate" TargetType="{x:Type ListBoxItem}">
- <Border
- x:Name="Bd"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="{StaticResource border-radius.4}"
- FocusVisualStyle="{x:Null}"
- SnapsToDevicePixels="True">
- <ContentPresenter
- Margin="16,8"
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- FocusVisualStyle="{x:Null}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
- <!--<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.sys.border.accent.lv2}" />-->
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="False" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
- </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"
- Width="{TemplateBinding Width}"
- Height="{TemplateBinding Height}"
- 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="EditToolsBorder" Property="Background" Value="#1A477EDE" />
- <Setter TargetName="EditToolsBorder" Property="BorderBrush" Value="Black" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="EditToolsBorder" Property="Background" Value="#1A477EDE" />
- <Setter TargetName="EditToolsBorder" Property="BorderBrush" Value="Black" />
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="EditToolsBorder" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </ResourceDictionary>
|