80 lines
5.2 KiB
XML
80 lines
5.2 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:HiiSheWpf="clr-namespace:HiiShe.WPFUI.Controls" >
|
|
<Style x:Key="{x:Type HiiSheWpf:HSTabItem}" TargetType="{x:Type HiiSheWpf:HSTabItem}">
|
|
<Setter Property="FrameworkElement.FocusVisualStyle">
|
|
<Setter.Value>
|
|
<Style>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Control.BorderBrush" Value="#FFACACAC" />
|
|
<Setter Property="FrameworkElement.Margin" Value="0" />
|
|
<Setter Property="Control.Padding" Value="6,2" />
|
|
<Setter Property="Control.HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Control.VerticalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type HiiSheWpf:HSTabItem}">
|
|
<Grid Name="templateRoot"
|
|
SnapsToDevicePixels="True"
|
|
Width="{TemplateBinding FrameworkElement.Width}"
|
|
Height="{TemplateBinding FrameworkElement.Height}"
|
|
Background="#00FFFFFF">
|
|
<!--<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates" />
|
|
<VisualStateGroup x:Name="SelectionStates" />
|
|
<VisualStateGroup x:Name="FocusStates" />
|
|
<VisualStateGroup x:Name="ValidationStates" />
|
|
</VisualStateManager.VisualStateGroups>-->
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="20" />
|
|
</Grid.RowDefinitions>
|
|
<Border Name="mainBorder" BorderThickness="1,1,1,0" Margin="0" Grid.RowSpan="1" Background="{TemplateBinding Control.Background}" Width="48" Height="48" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" />
|
|
<ContentPresenter Name="contentPresenter"
|
|
ContentTemplate="{TemplateBinding HeaderedContentControl.HeaderTemplate}"
|
|
Content="{TemplateBinding HeaderedContentControl.Header}"
|
|
ContentStringFormat="{TemplateBinding HeaderedContentControl.HeaderStringFormat}"
|
|
ContentSource="Header" Focusable="False"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Top"
|
|
TextElement.Foreground="{TemplateBinding Control.Foreground}" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="Selector.IsSelected" Value="True">
|
|
<Setter TargetName="templateRoot" Value="{Binding MyMoverBrush, RelativeSource={RelativeSource TemplatedParent}}" Property="Panel.Background" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="UIElement.IsMouseOver" Value="True" />
|
|
<Condition Property="Selector.IsSelected" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="templateRoot" Value="{Binding MyEnterBrush, RelativeSource={RelativeSource TemplatedParent}}" Property="Panel.Background" />
|
|
<Setter TargetName="mainBorder" Property="UIElement.RenderTransform">
|
|
<Setter.Value>
|
|
<TransformGroup>
|
|
<ScaleTransform ScaleX="1.05" ScaleY="1.05" />
|
|
<SkewTransform />
|
|
<RotateTransform />
|
|
<TranslateTransform />
|
|
</TransformGroup>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary> |