chore: add TabControlSliding style.

This commit is contained in:
NaBian committed 2022-12-17 19:09:18 +08:00
1 parent 4c4af40b77
commit a21b400d39
7 files changed
+823 -285

No files matched your search

@@ -11038,7 +11038,7 @@
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" />
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,1,0,0'}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
@@ -11048,7 +11048,6 @@
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,0,1'}" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -11059,7 +11058,6 @@
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='1,0,0,0'}" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -11070,7 +11068,6 @@
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,1,0'}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -11277,6 +11274,29 @@
</MultiTrigger>
</Style.Triggers>
</Style>
<Style x:Key="SlidingTabContainerBaseStyle" TargetType="hc:SlidingTabContainer">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Padding" Value="2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="hc:SlidingTabContainer">
<Border HorizontalAlignment="Center" VerticalAlignment="Center" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
<hc:SimplePanel>
<Border x:Name="PART_Sliding" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Width="0" Height="0" Effect="{StaticResource EffectShadow1}" Background="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Left" VerticalAlignment="Top">
<Border.RenderTransform>
<TranslateTransform />
</Border.RenderTransform>
</Border>
<ContentPresenter />
</hc:SimplePanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TimePickerBaseStyle" TargetType="hc:TimePicker">
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
@@ -13790,6 +13810,101 @@
<Style BasedOn="{StaticResource StepBarBaseStyle}" TargetType="hc:StepBar" />
<Style BasedOn="{StaticResource TabControlBaseStyle}" TargetType="TabControl" />
<Style BasedOn="{StaticResource TabControlPlusBaseStyle}" TargetType="hc:TabControl" />
<Style x:Key="TabItemSliding" TargetType="TabItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}">
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center" TextElement.Foreground="{TemplateBinding Foreground}" Focusable="False" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9" />
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="TextElement.Foreground" Value="{Binding Path=(hc:TitleElement.Foreground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource SlidingTabContainerBaseStyle}" TargetType="hc:SlidingTabContainer" />
<Style x:Key="TabControlSliding" TargetType="TabControl">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemSliding}" />
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource RegionBrush}" />
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabControl">
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<hc:SlidingTabContainer x:Name="TabContainer" Background="{TemplateBinding Background}" Grid.Row="0" Grid.Column="0">
<StackPanel x:Name="headerPanel" Orientation="Horizontal" Background="Transparent" Margin="0" IsItemsHost="True" />
</hc:SlidingTabContainer>
<Border x:Name="contentPanel" Margin="0,6,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,0,6" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Margin" Value="6,0,0,0" />
<Setter TargetName="TabContainer" Property="Grid.Column" Value="0" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Orientation" Value="Vertical" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,6,0" />
<Setter TargetName="TabContainer" Property="Grid.Column" Value="1" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Orientation" Value="Vertical" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TabItemInLine" BasedOn="{StaticResource TabItemStyle}" TargetType="TabItem">
<Setter Property="MinWidth" Value="0" />
</Style>
@@ -13808,7 +13923,7 @@
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<UniformGrid Rows="1" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" />
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,1,0,0'}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
@@ -13818,7 +13933,6 @@
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,0,1'}" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -13827,7 +13941,6 @@
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='1,0,0,0'}" />
<Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0" />
@@ -13840,7 +13953,6 @@
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,1,0'}" />
<Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0" />
@@ -8,42 +8,126 @@
<hc:TransitioningContentControl>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Margin="32" Spacing="32" ItemWidth="400" ItemHeight="200" MaxWidth="832" ChildWrapping="Wrap">
<TabControl SelectedIndex="3" Style="{StaticResource TabControlSliding}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="1" />
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}22" IsEnabled="False">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="2" />
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}333">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="3" />
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4444">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="4" />
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}55555">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="5" />
</TextBlock>
</Border>
</TabItem>
</TabControl>
<TabControl Style="{StaticResource TabControlSliding}" TabStripPlacement="Bottom">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="1" />
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}22" IsEnabled="False">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="2" />
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}333">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="3" />
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4444">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="4" />
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}55555">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}" />
<Run Text="5" />
</TextBlock>
</Border>
</TabItem>
</TabControl>
<TabControl TabStripPlacement="Right">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}2" IsEnabled="False">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="5"/>
</TextBlock>
@@ -52,40 +136,40 @@
</TabControl>
<TabControl Style="{StaticResource TabControlInLine}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem IsSelected="True" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="5"/>
</TextBlock>
@@ -94,40 +178,40 @@
</TabControl>
<TabControl TabStripPlacement="Left" Style="{StaticResource TabControlCapsule}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem IsSelected="True" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="5"/>
</TextBlock>
@@ -136,40 +220,40 @@
</TabControl>
<TabControl TabStripPlacement="Bottom" Style="{StaticResource TabControlCapsuleSolid}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}2" IsEnabled="False">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem IsSelected="True" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Border>
<TextBlock Style="{StaticResource TextBlockLargeBold}">
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="5"/>
</TextBlock>
@@ -0,0 +1,121 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Animation;
using HandyControl.Tools;
namespace HandyControl.Controls;
[TemplatePart(Name = ElementSliding, Type = typeof(FrameworkElement))]
public class SlidingTabContainer : ContentControl
{
private const string ElementSliding = "PART_Sliding";
private FrameworkElement _sliding = new();
private System.Windows.Controls.TabControl _tabControl;
public SlidingTabContainer()
{
Loaded += OnLoaded;
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
Loaded -= OnLoaded;
OnSelectionChanged(null, null);
}
public override void OnApplyTemplate()
{
if (_tabControl is not null)
{
_tabControl.SelectionChanged -= OnSelectionChanged;
}
base.OnApplyTemplate();
_tabControl = VisualHelper.GetParent<System.Windows.Controls.TabControl>(this);
_sliding = GetTemplateChild(ElementSliding) as FrameworkElement;
if (_tabControl is not null)
{
_tabControl.SelectionChanged += OnSelectionChanged;
if (IsLoaded)
{
OnSelectionChanged(null, null);
}
}
}
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
base.OnRenderSizeChanged(sizeInfo);
if (_tabControl is null)
{
return;
}
OnSelectionChanged(null, null);
}
private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (_sliding is null || !IsLoaded)
{
return;
}
if (_tabControl.ItemContainerGenerator.ContainerFromItem(_tabControl.SelectedItem) is not System.Windows.Controls.TabItem tabItem)
{
return;
}
var offset = VisualTreeHelper.GetOffset(tabItem);
var tabWidth = tabItem.ActualWidth;
var tabHeight = tabItem.ActualHeight;
var useAnimation = _sliding.Width > 0 && _sliding.Height > 0;
if (useAnimation)
{
var storyboard = new Storyboard();
var easingFuction = new PowerEase
{
EasingMode = EasingMode.EaseOut,
};
var widthAnimation = AnimationHelper.CreateAnimation(tabWidth);
widthAnimation.EasingFunction = easingFuction;
Storyboard.SetTarget(widthAnimation, _sliding);
Storyboard.SetTargetProperty(widthAnimation, new PropertyPath(WidthProperty.Name));
storyboard.Children.Add(widthAnimation);
var heightAnimation = AnimationHelper.CreateAnimation(tabHeight);
heightAnimation.EasingFunction = easingFuction;
Storyboard.SetTarget(heightAnimation, _sliding);
Storyboard.SetTargetProperty(heightAnimation, new PropertyPath(HeightProperty.Name));
storyboard.Children.Add(heightAnimation);
var xAnimation = AnimationHelper.CreateAnimation(offset.X);
xAnimation.EasingFunction = easingFuction;
Storyboard.SetTarget(xAnimation, _sliding);
Storyboard.SetTargetProperty(xAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.X)"));
storyboard.Children.Add(xAnimation);
var yAnimation = AnimationHelper.CreateAnimation(offset.Y);
yAnimation.EasingFunction = easingFuction;
Storyboard.SetTarget(yAnimation, _sliding);
Storyboard.SetTargetProperty(yAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.Y)"));
storyboard.Children.Add(yAnimation);
storyboard.Begin();
}
else
{
_sliding.Width = tabItem.ActualWidth;
_sliding.Height = tabItem.ActualHeight;
_sliding.RenderTransform = new TranslateTransform(offset.X, offset.Y);
}
}
}
@@ -90,6 +90,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Block\RunningBlock\RunningBlock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\TabControl\SlidingTabContainer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Tag\TagContainer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Text\HighlightTextBlock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Text\SimpleText.cs" />
@@ -1,69 +1,64 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:hc="clr-namespace:HandyControl.Controls" xmlns:langs="clr-namespace:HandyControl.Properties.Langs" xmlns:interactivity="clr-namespace:HandyControl.Interactivity" xmlns:system="clr-namespace:System;assembly=mscorlib">
<Style x:Key="TabItemStyle" TargetType="TabItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource TitleBrush}"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource TitleBrush}" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<hc:SimplePanel x:Name="templateRoot" SnapsToDevicePixels="true">
<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" Margin="0"/>
<ContentPresenter x:Name="contentPresenter" TextElement.Foreground="{DynamicResource PrimaryTextBrush}" ContentSource="Header" Focusable="False" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" Margin="0" />
<ContentPresenter x:Name="contentPresenter" TextElement.Foreground="{DynamicResource PrimaryTextBrush}" ContentSource="Header" Focusable="False" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
</hc:SimplePanel>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="False">
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,0,0"/>
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,0,0" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter"/>
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Top"/>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Top" />
</MultiDataTrigger.Conditions>
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,0,3"/>
<Setter Property="Panel.ZIndex" Value="1" />
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter" />
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,0,3" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Left"/>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Left" />
</MultiDataTrigger.Conditions>
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,3,0"/>
<Setter Property="Panel.ZIndex" Value="1" />
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter" />
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,3,0" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Bottom"/>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Bottom" />
</MultiDataTrigger.Conditions>
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,3,0,0"/>
<Setter Property="Panel.ZIndex" Value="1" />
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter" />
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,3,0,0" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Right"/>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Right" />
</MultiDataTrigger.Conditions>
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
<Setter Property="BorderThickness" TargetName="mainBorder" Value="3,0,0,0"/>
<Setter Property="Panel.ZIndex" Value="1" />
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter" />
<Setter Property="BorderThickness" TargetName="mainBorder" Value="3,0,0,0" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -72,35 +67,34 @@
</Style>
<Style x:Key="TabControlBaseStyle" TargetType="TabControl">
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemStyle}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="White" />
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemStyle}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabControl">
<Grid x:Name="templateRoot" Background="{TemplateBinding Background}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
<ColumnDefinition x:Name="ColumnDefinition0" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,1,0,0'}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" />
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto"/>
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1"/>
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0"/>
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,0,1'}"/>
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -111,7 +105,6 @@
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='1,0,0,0'}"/>
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -122,7 +115,6 @@
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,1,0'}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -131,40 +123,40 @@
</Style>
<Style x:Key="TabItemCapsuleBaseStyle" TargetType="TabItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="hc:BorderElement.CornerRadius" Value="0"/>
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="Padding" Value="10,0"/>
<Setter Property="Margin" Value="-1,0,0,0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="hc:BorderElement.CornerRadius" Value="0" />
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="Margin" Value="-1,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border x:Name="BorderRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" TextElement.Foreground="{TemplateBinding Foreground}" Focusable="False" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" TextElement.Foreground="{TemplateBinding Foreground}" Focusable="False" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" TargetName="BorderRoot"/>
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" TargetName="BorderRoot" />
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter" />
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="BorderBrush" Value="{Binding Path=(hc:TitleElement.BorderBrush),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
<Setter Property="Background" Value="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
<Setter Property="TextElement.Foreground" Value="{Binding Path=(hc:TitleElement.Foreground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter"/>
<Setter Property="BorderBrush" Value="{Binding Path=(hc:TitleElement.BorderBrush),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot" />
<Setter Property="Background" Value="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot" />
<Setter Property="TextElement.Foreground" Value="{Binding Path=(hc:TitleElement.Foreground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter" />
</Trigger>
<DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Left">
<Setter Property="Margin" Value="0,-1,0,0"/>
<Setter Property="Margin" Value="0,-1,0,0" />
</DataTrigger>
<DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Right">
<Setter Property="Margin" Value="0,-1,0,0"/>
<Setter Property="Margin" Value="0,-1,0,0" />
</DataTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter"/>
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -172,68 +164,68 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}"/>
<Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}" />
</Trigger>
</Style.Triggers>
</Style>
<ContextMenu x:Key="TabItemMenu" x:Shared="False">
<MenuItem Command="interactivity:ControlCommands.Close" Header="{x:Static langs:Lang.Close}"/>
<MenuItem Command="interactivity:ControlCommands.CloseAll" Header="{x:Static langs:Lang.CloseAll}"/>
<MenuItem Command="interactivity:ControlCommands.CloseOther" Header="{x:Static langs:Lang.CloseOther}"/>
<MenuItem Command="interactivity:ControlCommands.Close" Header="{x:Static langs:Lang.Close}" />
<MenuItem Command="interactivity:ControlCommands.CloseAll" Header="{x:Static langs:Lang.CloseAll}" />
<MenuItem Command="interactivity:ControlCommands.CloseOther" Header="{x:Static langs:Lang.CloseOther}" />
</ContextMenu>
<Style x:Key="TabItemPlusBaseStyle" TargetType="hc:TabItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="BorderThickness" Value="1,0,1,1"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="10,0,0,0"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Menu" Value="{StaticResource TabItemMenu}"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
<Setter Property="BorderThickness" Value="1,0,1,1" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="10,0,0,0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Menu" Value="{StaticResource TabItemMenu}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="hc:TabItem">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" ContextMenu="{TemplateBinding Menu}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="3" BorderThickness="{TemplateBinding BorderThickness}" x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="0">
<Border Margin="0,0,0,-1" x:Name="innerBorder" Background="{DynamicResource RegionBrush}" Visibility="Collapsed"/>
<Border Margin="0,0,0,-1" x:Name="innerBorder" Background="{DynamicResource RegionBrush}" Visibility="Collapsed" />
</Border>
<Path x:Name="PathMain" Margin="10,0,0,0" Grid.Column="0" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}"/>
<ContentPresenter Grid.Column="1" x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
<Path x:Name="PathMain" Margin="10,0,0,0" Grid.Column="0" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}" />
<ContentPresenter Grid.Column="1" x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
<Border Name="BorderMask" Grid.Column="1" HorizontalAlignment="Right" Width="20" Background="{TemplateBinding Background}" Margin="0,0,1,1">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="White" Offset="1"/>
<GradientStop Offset="0"/>
<GradientStop Color="White" Offset="1" />
<GradientStop Offset="0" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Button Grid.Column="2" Focusable="False" Command="interactivity:ControlCommands.Close" Visibility="{TemplateBinding ShowCloseButton,Converter={StaticResource Boolean2VisibilityConverter}}" Background="Transparent" Style="{StaticResource ButtonCustom}" Width="28">
<Path Fill="{DynamicResource PrimaryTextBrush}" Width="8" Height="8" Style="{StaticResource ClosePathStyle}"/>
<Path Fill="{DynamicResource PrimaryTextBrush}" Width="8" Height="8" Style="{StaticResource ClosePathStyle}" />
</Button>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="Visibility" TargetName="innerBorder" Value="Visible"/>
<Setter Property="Background" TargetName="BorderMask" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Panel.ZIndex" Value="1" />
<Setter Property="Visibility" TargetName="innerBorder" Value="Visible" />
<Setter Property="Background" TargetName="BorderMask" Value="{DynamicResource RegionBrush}" />
</Trigger>
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain" />
</Trigger>
<Trigger Property="ShowCloseButton" Value="True">
<Setter Property="Margin" Value="0,0,0,1" TargetName="BorderMask"/>
<Setter Property="Margin" Value="0,0,0,1" TargetName="BorderMask" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter"/>
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -245,29 +237,29 @@
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
<ColumnDefinition x:Name="ColumnDefinition0" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border Background="{TemplateBinding Background}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}">
<hc:TabPanel MinHeight="{TemplateBinding TabItemHeight}" TabItemHeight="{TemplateBinding TabItemHeight}" TabItemWidth="{TemplateBinding TabItemWidth}" IsTabFillEnabled="{TemplateBinding IsTabFillEnabled}" Margin="0,0,-1,-1" x:Name="PART_HeaderPanel" HorizontalAlignment="Left" Background="{DynamicResource SecondaryTextBrush}" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1">
<interactivity:Interaction.Behaviors>
<interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}">
<interactivity:FluidMoveBehavior.EaseX>
<CubicEase EasingMode="EaseOut"/>
<CubicEase EasingMode="EaseOut" />
</interactivity:FluidMoveBehavior.EaseX>
</interactivity:FluidMoveBehavior>
</interactivity:Interaction.Behaviors>
</hc:TabPanel>
</Border>
<Border x:Name="contentPanel" Background="{DynamicResource SecondaryRegionBrush}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<Border Visibility="{Binding Visibility,ElementName=PART_OverflowButton}" Margin="0,-1,0,0" Grid.Row="0" Grid.Column="0" BorderThickness="1,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Right">
<hc:ContextMenuToggleButton x:Name="PART_OverflowButton" Visibility="Collapsed" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"/>
<hc:ContextMenuToggleButton x:Name="PART_OverflowButton" Visibility="Collapsed" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}" />
</Border>
</Grid>
</Border>
@@ -277,19 +269,19 @@
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border Visibility="{TemplateBinding ShowScrollButton,Converter={StaticResource Boolean2VisibilityConverter}}" Margin="0,-1,0,0" Grid.Row="0" Grid.Column="0" BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Left" Panel.ZIndex="2">
<Border.CacheMode>
<BitmapCache SnapsToDevicePixels="True"/>
<BitmapCache SnapsToDevicePixels="True" />
</Border.CacheMode>
<RepeatButton Focusable="False" Style="{StaticResource RepeatButtonIcon}" Padding="8" hc:IconElement.Geometry="{StaticResource LeftGeometry}" Foreground="{DynamicResource PrimaryTextBrush}" Background="{DynamicResource SecondaryRegionBrush}" x:Name="PART_ScrollButtonLeft"/>
<RepeatButton Focusable="False" Style="{StaticResource RepeatButtonIcon}" Padding="8" hc:IconElement.Geometry="{StaticResource LeftGeometry}" Foreground="{DynamicResource PrimaryTextBrush}" Background="{DynamicResource SecondaryRegionBrush}" x:Name="PART_ScrollButtonLeft" />
</Border>
<hc:ScrollViewer HorizontalScrollBarVisibility="Hidden" CanMouseWheel="True" hc:ScrollViewerAttach.Orientation="Horizontal" IsInertiaEnabled="True" Grid.Row="0" Grid.Column="1" IsDeferredScrollingEnabled="True" x:Name="PART_OverflowScrollviewer">
<Border Background="{TemplateBinding Background}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Name="PART_HeaderBorder">
@@ -297,7 +289,7 @@
<interactivity:Interaction.Behaviors>
<interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}">
<interactivity:FluidMoveBehavior.EaseX>
<CubicEase EasingMode="EaseOut"/>
<CubicEase EasingMode="EaseOut" />
</interactivity:FluidMoveBehavior.EaseX>
</interactivity:FluidMoveBehavior>
</interactivity:Interaction.Behaviors>
@@ -306,39 +298,63 @@
</hc:ScrollViewer>
<Border Margin="0,-1,0,0" Grid.Row="0" Grid.Column="2" BorderThickness="1,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Right">
<Border.CacheMode>
<BitmapCache SnapsToDevicePixels="True"/>
<BitmapCache SnapsToDevicePixels="True" />
</Border.CacheMode>
<StackPanel Orientation="Horizontal">
<RepeatButton Focusable="False" Visibility="{TemplateBinding ShowScrollButton,Converter={StaticResource Boolean2VisibilityConverter}}" Style="{StaticResource RepeatButtonIcon}" BorderBrush="{DynamicResource BorderBrush}" Padding="8" hc:IconElement.Geometry="{StaticResource RightGeometry}" Foreground="{DynamicResource PrimaryTextBrush}" Background="{DynamicResource SecondaryRegionBrush}" x:Name="PART_ScrollButtonRight"/>
<Border Visibility="{Binding Visibility,ElementName=PART_OverflowButton}" Width="1" Background="{DynamicResource BorderBrush}"/>
<hc:ContextMenuToggleButton x:Name="PART_OverflowButton" Visibility="Collapsed" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"/>
<RepeatButton Focusable="False" Visibility="{TemplateBinding ShowScrollButton,Converter={StaticResource Boolean2VisibilityConverter}}" Style="{StaticResource RepeatButtonIcon}" BorderBrush="{DynamicResource BorderBrush}" Padding="8" hc:IconElement.Geometry="{StaticResource RightGeometry}" Foreground="{DynamicResource PrimaryTextBrush}" Background="{DynamicResource SecondaryRegionBrush}" x:Name="PART_ScrollButtonRight" />
<Border Visibility="{Binding Visibility,ElementName=PART_OverflowButton}" Width="1" Background="{DynamicResource BorderBrush}" />
<hc:ContextMenuToggleButton x:Name="PART_OverflowButton" Visibility="Collapsed" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}" />
</StackPanel>
</Border>
<Border x:Name="contentPanel" Background="{DynamicResource SecondaryRegionBrush}" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
</Border>
</ControlTemplate>
<Style x:Key="TabControlPlusBaseStyle" TargetType="hc:TabControl">
<Setter Property="Padding" Value="0"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemPlusBaseStyle}"/>
<Setter Property="Template" Value="{StaticResource TabControlPlusTemplate}"/>
<Setter Property="Padding" Value="0" />
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemPlusBaseStyle}" />
<Setter Property="Template" Value="{StaticResource TabControlPlusTemplate}" />
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsScrollable" Value="True"/>
<Condition Property="IsTabFillEnabled" Value="False"/>
<Condition Property="IsScrollable" Value="True" />
<Condition Property="IsTabFillEnabled" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Template" Value="{StaticResource TabControlPlusScrollableTemplate}"/>
<Setter Property="Template" Value="{StaticResource TabControlPlusScrollableTemplate}" />
</MultiTrigger>
</Style.Triggers>
</Style>
<Style x:Key="SlidingTabContainerBaseStyle" TargetType="hc:SlidingTabContainer">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Padding" Value="2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="hc:SlidingTabContainer">
<Border HorizontalAlignment="Center" VerticalAlignment="Center" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
<hc:SimplePanel>
<Border x:Name="PART_Sliding" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Width="0" Height="0" Effect="{StaticResource EffectShadow1}" Background="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Left" VerticalAlignment="Top">
<Border.RenderTransform>
<TranslateTransform />
</Border.RenderTransform>
</Border>
<ContentPresenter />
</hc:SimplePanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
@@ -1,68 +1,34 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:tools="clr-namespace:HandyControl.Tools">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:hc="clr-namespace:HandyControl.Controls" xmlns:tools="clr-namespace:HandyControl.Tools">
<Style BasedOn="{StaticResource TabControlBaseStyle}" TargetType="TabControl"/>
<Style BasedOn="{StaticResource TabControlBaseStyle}" TargetType="TabControl" />
<Style BasedOn="{StaticResource TabControlPlusBaseStyle}" TargetType="hc:TabControl"/>
<Style BasedOn="{StaticResource TabControlPlusBaseStyle}" TargetType="hc:TabControl" />
<Style x:Key="TabItemInLine" BasedOn="{StaticResource TabItemStyle}" TargetType="TabItem">
<Setter Property="MinWidth" Value="0"/>
</Style>
<Style x:Key="TabControlInLine" BasedOn="{StaticResource TabControlBaseStyle}" TargetType="TabControl">
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemInLine}"/>
<Style x:Key="TabItemSliding" TargetType="TabItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabControl">
<Grid x:Name="templateRoot" Background="{TemplateBinding Background}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<UniformGrid Rows="1" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,1,0,0'}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</Grid>
<ControlTemplate TargetType="TabItem">
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}">
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center" TextElement.Foreground="{TemplateBinding Foreground}" Focusable="False" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto"/>
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1"/>
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0"/>
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,0,1'}"/>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='1,0,0,0'}"/>
<Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0"/>
<Setter TargetName="headerPanel" Property="Columns" Value="1"/>
<Trigger Property="IsSelected" Value="true">
<Setter Property="TextElement.Foreground" Value="{Binding Path=(hc:TitleElement.Foreground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,1,0'}"/>
<Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0"/>
<Setter TargetName="headerPanel" Property="Columns" Value="1"/>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -70,39 +36,165 @@
</Setter>
</Style>
<Style x:Key="TabItemCapsuleDefault" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem"/>
<Style BasedOn="{StaticResource SlidingTabContainerBaseStyle}" TargetType="hc:SlidingTabContainer" />
<Style x:Key="TabControlSliding" TargetType="TabControl">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemSliding}" />
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource RegionBrush}" />
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabControl">
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<hc:SlidingTabContainer x:Name="TabContainer" Background="{TemplateBinding Background}" Grid.Row="0" Grid.Column="0">
<StackPanel x:Name="headerPanel" Orientation="Horizontal" Background="Transparent" Margin="0" IsItemsHost="True" />
</hc:SlidingTabContainer>
<Border x:Name="contentPanel" Margin="0,6,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,0,6" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Margin" Value="6,0,0,0" />
<Setter TargetName="TabContainer" Property="Grid.Column" Value="0" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Orientation" Value="Vertical" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,6,0" />
<Setter TargetName="TabContainer" Property="Grid.Column" Value="1" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Orientation" Value="Vertical" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TabItemInLine" BasedOn="{StaticResource TabItemStyle}" TargetType="TabItem">
<Setter Property="MinWidth" Value="0" />
</Style>
<Style x:Key="TabControlInLine" BasedOn="{StaticResource TabControlBaseStyle}" TargetType="TabControl">
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemInLine}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabControl">
<Grid x:Name="templateRoot" Background="{TemplateBinding Background}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<UniformGrid Rows="1" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" />
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0" />
<Setter TargetName="headerPanel" Property="Columns" Value="1" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0" />
<Setter TargetName="headerPanel" Property="Columns" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TabItemCapsuleDefault" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem" />
<Style x:Key="TabItemCapsuleHorizontalFirst" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
<Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4" />
<Setter Property="Margin" Value="0" />
</Style>
<Style x:Key="TabItemCapsuleHorizontalLast" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
<Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0"/>
<Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0" />
</Style>
<Style x:Key="TabItemCapsuleSingle" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
</Style>
<Style x:Key="TabItemCapsuleVerticalFirst" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
<Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0" />
<Setter Property="Margin" Value="0" />
</Style>
<Style x:Key="TabItemCapsuleVerticalLast" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
<Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4"/>
<Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4" />
</Style>
<Style x:Key="TabControlCapsule" TargetType="TabControl">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="hc:TitleElement.BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource PrimaryBrush}"/>
<Style x:Key="TabControlCapsule" TargetType="TabControl">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
<Setter Property="hc:TitleElement.BorderBrush" Value="{DynamicResource PrimaryBrush}" />
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource RegionBrush}" />
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource PrimaryBrush}" />
<Setter Property="ItemContainerStyleSelector">
<Setter.Value>
<tools:TabItemCapsuleStyleSelector/>
<tools:TabItemCapsuleStyleSelector />
</Setter.Value>
</Setter>
<Setter Property="Template">
@@ -110,25 +202,25 @@
<ControlTemplate TargetType="TabControl">
<Grid x:Name="templateRoot" Background="{TemplateBinding Background}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
<ColumnDefinition x:Name="ColumnDefinition0" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<UniformGrid Rows="1" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<UniformGrid Rows="1" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" />
<Border x:Name="contentPanel" Margin="0,6,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto"/>
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1"/>
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,0,6"/>
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0"/>
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,0,6" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -137,11 +229,11 @@
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
<Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0"/>
<Setter TargetName="headerPanel" Property="Columns" Value="1"/>
<Setter TargetName="headerPanel" Property="Rows" Value="0" />
<Setter TargetName="headerPanel" Property="Columns" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Margin" Value="6,0,0,0"/>
<Setter TargetName="contentPanel" Property="Margin" Value="6,0,0,0" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -150,11 +242,11 @@
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
<Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0"/>
<Setter TargetName="headerPanel" Property="Columns" Value="1"/>
<Setter TargetName="headerPanel" Property="Rows" Value="0" />
<Setter TargetName="headerPanel" Property="Columns" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,6,0"/>
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,6,0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -163,9 +255,9 @@
</Style>
<Style x:Key="TabControlCapsuleSolid" BasedOn="{StaticResource TabControlCapsule}" TargetType="TabControl">
<Setter Property="hc:TitleElement.BorderBrush" Value="{DynamicResource TitleBrush}"/>
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}"/>
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource TextIconBrush}"/>
<Setter Property="hc:TitleElement.BorderBrush" Value="{DynamicResource TitleBrush}" />
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}" />
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource TextIconBrush}" />
</Style>
</ResourceDictionary>
@@ -11155,7 +11155,7 @@
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" />
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,1,0,0'}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
@@ -11165,7 +11165,6 @@
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,0,1'}" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -11176,7 +11175,6 @@
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='1,0,0,0'}" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -11187,7 +11185,6 @@
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,1,0'}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -11394,6 +11391,29 @@
</MultiTrigger>
</Style.Triggers>
</Style>
<Style x:Key="SlidingTabContainerBaseStyle" TargetType="hc:SlidingTabContainer">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Padding" Value="2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="hc:SlidingTabContainer">
<Border HorizontalAlignment="Center" VerticalAlignment="Center" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
<hc:SimplePanel>
<Border x:Name="PART_Sliding" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Width="0" Height="0" Effect="{StaticResource EffectShadow1}" Background="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Left" VerticalAlignment="Top">
<Border.RenderTransform>
<TranslateTransform />
</Border.RenderTransform>
</Border>
<ContentPresenter />
</hc:SimplePanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TimePickerBaseStyle" TargetType="hc:TimePicker">
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
@@ -13938,6 +13958,101 @@
<Style BasedOn="{StaticResource StepBarBaseStyle}" TargetType="hc:StepBar" />
<Style BasedOn="{StaticResource TabControlBaseStyle}" TargetType="TabControl" />
<Style BasedOn="{StaticResource TabControlPlusBaseStyle}" TargetType="hc:TabControl" />
<Style x:Key="TabItemSliding" TargetType="TabItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}">
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center" TextElement.Foreground="{TemplateBinding Foreground}" Focusable="False" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9" />
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="TextElement.Foreground" Value="{Binding Path=(hc:TitleElement.Foreground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" TargetName="contentPresenter" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource SlidingTabContainerBaseStyle}" TargetType="hc:SlidingTabContainer" />
<Style x:Key="TabControlSliding" TargetType="TabControl">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemSliding}" />
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource RegionBrush}" />
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabControl">
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<hc:SlidingTabContainer x:Name="TabContainer" Background="{TemplateBinding Background}" Grid.Row="0" Grid.Column="0">
<StackPanel x:Name="headerPanel" Orientation="Horizontal" Background="Transparent" Margin="0" IsItemsHost="True" />
</hc:SlidingTabContainer>
<Border x:Name="contentPanel" Margin="0,6,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,0,6" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Margin" Value="6,0,0,0" />
<Setter TargetName="TabContainer" Property="Grid.Column" Value="0" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Orientation" Value="Vertical" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
<Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,6,0" />
<Setter TargetName="TabContainer" Property="Grid.Column" Value="1" />
<Setter TargetName="TabContainer" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Orientation" Value="Vertical" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TabItemInLine" BasedOn="{StaticResource TabItemStyle}" TargetType="TabItem">
<Setter Property="MinWidth" Value="0" />
</Style>
@@ -13956,7 +14071,7 @@
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<UniformGrid Rows="1" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" />
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,1,0,0'}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
@@ -13966,7 +14081,6 @@
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,0,1'}" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
@@ -13975,7 +14089,6 @@
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='1,0,0,0'}" />
<Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0" />
@@ -13988,7 +14101,6 @@
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="contentPanel" Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='0,0,1,0'}" />
<Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
<Setter TargetName="headerPanel" Property="Rows" Value="0" />