| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:ZUI="clr-namespace:CustomUI">
- <SolidColorBrush x:Key="Item.MouseOver.Background" Color="#F3F3F3" />
- <SolidColorBrush x:Key="Item.MouseOver.Border" Color="#a826A0Da" />
- <SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA" />
- <SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="#FFDADADA" />
- <SolidColorBrush x:Key="Item.SelectedActive.Background" Color="#3D26A0DA" />
- <SolidColorBrush x:Key="Item.SelectedActive.Border" Color="#FF26A0DA" />
- <Style TargetType="{x:Type ZUI:Heading}">
- <Setter Property="Foreground" Value="#000000" />
- <Setter Property="FontSize" Value="14" />
- </Style>
- <!--#region 左边样式-->
- <Style x:Key="LeftIndicatorStyle" TargetType="{x:Type ZUI:SegmentControl}">
- <Setter Property="Padding" Value="0" />
- <Setter Property="CornerRadius" Value="0" />
- <Setter Property="VerticalAlignment" Value="Top" />
- <Setter Property="BorderThickness" Value="0,0,1,0" />
- <Setter Property="BorderBrush" Value="#D7DDE4" />
- <Setter Property="VerticalAlignment" Value="Stretch" />
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <StackPanel IsItemsHost="True" Orientation="Vertical" />
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="LeftIndicatorItemStyle" TargetType="{x:Type ZUI:SegmentItem}">
- <Setter Property="Padding" Value="0" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="HorizontalContentAlignment" Value="Right" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ZUI:SegmentItem}">
- <Border
- x:Name="Bd"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true"
- UseLayoutRounding="True">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="3" />
- </Grid.ColumnDefinitions>
- <ContentPresenter
- Margin="20,8,20,8"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- <Border
- x:Name="markline"
- Grid.Column="1"
- Background="#003399FF"
- SnapsToDevicePixels="True"
- UseLayoutRounding="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Item.MouseOver.Border}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Item.MouseOver.Border}" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="False" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="markline" Property="Background" Value="#3399FF" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="markline" Property="Background" Value="#3399FF" />
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.MouseOver.Background}" />
- <Setter Property="Foreground" Value="#3399FF" />
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
- <!--#region 右边样式-->
- <Style x:Key="RightIndicatorStyle" TargetType="{x:Type ZUI:SegmentControl}">
- <Setter Property="Padding" Value="0" />
- <Setter Property="CornerRadius" Value="0" />
- <Setter Property="VerticalAlignment" Value="Top" />
- <Setter Property="BorderThickness" Value="1,0,0,0" />
- <Setter Property="BorderBrush" Value="#D7DDE4" />
- <Setter Property="VerticalAlignment" Value="Stretch" />
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <StackPanel IsItemsHost="True" Orientation="Vertical" />
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="RightIndicatorItemStyle" TargetType="{x:Type ZUI:SegmentItem}">
- <Setter Property="Padding" Value="0" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ZUI:SegmentItem}">
- <Border
- x:Name="Bd"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true"
- UseLayoutRounding="True">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <ContentPresenter
- Grid.Column="1"
- Margin="20,8,20,8"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- <Border
- x:Name="markline"
- Grid.Column="0"
- Background="#003399FF"
- SnapsToDevicePixels="True"
- UseLayoutRounding="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Item.MouseOver.Border}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Item.MouseOver.Border}" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="False" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="markline" Property="Background" Value="#3399FF" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="markline" Property="Background" Value="#3399FF" />
- <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.MouseOver.Background}" />
- <Setter Property="Foreground" Value="#3399FF" />
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
- <!--#region 索引器在左边-->
- <ControlTemplate x:Key="IndicatorIsInLeft" TargetType="{x:Type ZUI:NavigationPanel}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <ZUI:SegmentControl
- x:Name="PART_Indicator"
- Margin="{TemplateBinding IndicatorMargin}"
- HorizontalAlignment="{TemplateBinding IndicatorHorizontalAlignment}"
- DisplayMemberPath="Header"
- ItemContainerStyle="{TemplateBinding IndicatorItemContainerStyle}"
- ItemsSource="{TemplateBinding ItemsSource}"
- SelectedIndex="0"
- Style="{TemplateBinding IndicatorStyle}" />
- <ContentPresenter
- x:Name="PART_ContentPresenter"
- Grid.Column="1"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Grid>
- </ControlTemplate>
- <!--#endregion-->
- <!--#region 索引器在顶部-->
- <ControlTemplate x:Key="IndicatorIsInTop" TargetType="{x:Type ZUI:NavigationPanel}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <ZUI:SegmentControl
- x:Name="PART_Indicator"
- Margin="{TemplateBinding IndicatorMargin}"
- HorizontalAlignment="{TemplateBinding IndicatorHorizontalAlignment}"
- DisplayMemberPath="Header"
- ItemContainerStyle="{TemplateBinding IndicatorItemContainerStyle}"
- ItemsSource="{TemplateBinding ItemsSource}"
- SelectedIndex="0"
- Style="{TemplateBinding IndicatorStyle}" />
- <ContentPresenter
- x:Name="PART_ContentPresenter"
- Grid.Row="1"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Grid>
- </ControlTemplate>
- <!--#endregion-->
- <!--#region 索引器在右边-->
- <ControlTemplate x:Key="IndicatorIsInRight" TargetType="{x:Type ZUI:NavigationPanel}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <ZUI:SegmentControl
- x:Name="PART_Indicator"
- Grid.Column="1"
- Margin="{TemplateBinding IndicatorMargin}"
- HorizontalAlignment="{TemplateBinding IndicatorHorizontalAlignment}"
- DisplayMemberPath="Header"
- ItemContainerStyle="{TemplateBinding IndicatorItemContainerStyle}"
- ItemsSource="{TemplateBinding ItemsSource}"
- SelectedIndex="0"
- Style="{TemplateBinding IndicatorStyle}" />
- <ContentPresenter
- x:Name="PART_ContentPresenter"
- Grid.Column="0"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Grid>
- </ControlTemplate>
- <!--#endregion-->
- <!--#region 索引器在底部-->
- <ControlTemplate x:Key="IndicatorIsInBottom" TargetType="{x:Type ZUI:NavigationPanel}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <ZUI:SegmentControl
- x:Name="PART_Indicator"
- Grid.Row="1"
- Margin="{TemplateBinding IndicatorMargin}"
- HorizontalAlignment="{TemplateBinding IndicatorHorizontalAlignment}"
- DisplayMemberPath="Header"
- ItemContainerStyle="{TemplateBinding IndicatorItemContainerStyle}"
- ItemsSource="{TemplateBinding ItemsSource}"
- SelectedIndex="0"
- Style="{TemplateBinding IndicatorStyle}" />
- <ContentPresenter
- x:Name="PART_ContentPresenter"
- Grid.Row="0"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Grid>
- </ControlTemplate>
- <!--#endregion-->
- <Style TargetType="{x:Type ZUI:NavigationPanel}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Foreground" Value="Black" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="UseLayoutRounding" Value="True" />
- <Setter Property="Template" Value="{StaticResource IndicatorIsInTop}" />
- <Style.Triggers>
- <Trigger Property="IndicatorPlacement" Value="Left">
- <Setter Property="Template" Value="{StaticResource IndicatorIsInLeft}" />
- <Setter Property="IndicatorItemContainerStyle" Value="{StaticResource LeftIndicatorItemStyle}" />
- <Setter Property="IndicatorStyle" Value="{StaticResource LeftIndicatorStyle}" />
- </Trigger>
- <Trigger Property="IndicatorPlacement" Value="Right">
- <Setter Property="Template" Value="{StaticResource IndicatorIsInRight}" />
- <Setter Property="IndicatorItemContainerStyle" Value="{StaticResource RightIndicatorItemStyle}" />
- <Setter Property="IndicatorStyle" Value="{StaticResource RightIndicatorStyle}" />
- </Trigger>
- <Trigger Property="IndicatorPlacement" Value="Bottom">
- <Setter Property="Template" Value="{StaticResource IndicatorIsInBottom}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </ResourceDictionary>
|