123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360 |
- <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="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" />
- </hc:SimplePanel>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="False">
- <Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,0,0" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <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" />
- </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,2" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <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,2,0" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <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,2,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" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Panel.ZIndex" Value="1" />
- <Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter" />
- <Setter Property="BorderThickness" TargetName="mainBorder" Value="2,0,0,0" />
- </MultiDataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </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="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TabControl">
- <Grid x:Name="templateRoot" Background="{TemplateBinding Background}" ClipToBounds="true" SnapsToDevicePixels="true">
- <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>
- <TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0"/>
- <Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" Grid.Row="1">
- <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="headerPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
- </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="headerPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </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="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" />
- </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" />
- </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" />
- </Trigger>
- <DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType=TabControl}}" Value="Left">
- <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" />
- </DataTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Opacity" Value="0.4" TargetName="contentPresenter" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <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}" />
- </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="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" />
- </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>
- <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" />
- </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}" />
- </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}" />
- </Trigger>
- <Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
- <Setter Property="Visibility" Value="Collapsed" TargetName="PathMain" />
- </Trigger>
- <Trigger Property="ShowCloseButton" Value="True">
- <Setter Property="Margin" Value="0,0,0,1" TargetName="BorderMask" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Opacity" Value="0.4" TargetName="contentPresenter" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="TabControlPlusTemplate" TargetType="hc:TabControl">
- <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
- <Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition x:Name="ColumnDefinition0" />
- <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <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">
- <interactivity:Interaction.Behaviors>
- <interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}">
- <interactivity:FluidMoveBehavior.EaseX>
- <CubicEase EasingMode="EaseOut" />
- </interactivity:FluidMoveBehavior.EaseX>
- </interactivity:FluidMoveBehavior>
- </interactivity:Interaction.Behaviors>
- </hc:TabPanel>
- </Border>
- <Border x:Name="contentPanel" Background="{DynamicResource SecondaryRegionBrush}" Grid.Column="0" Grid.Row="1">
- <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" Padding="0" hc:IconElement.Width="14" Height="Auto" BorderThickness="0" Background="{DynamicResource SecondaryRegionBrush}" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}" />
- </Border>
- </Grid>
- </Border>
- </ControlTemplate>
- <ControlTemplate x:Key="TabControlPlusScrollableTemplate" TargetType="hc:TabControl">
- <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
- <Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <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" />
- </Border.CacheMode>
- <RepeatButton Focusable="False" Style="{StaticResource RepeatButtonIcon}" BorderThickness="0" hc:IconElement.Height="14" Padding="8 0" Height="Auto" VerticalAlignment="Stretch" Width="{StaticResource DefaultControlHeight}" 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">
- <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">
- <interactivity:Interaction.Behaviors>
- <interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}">
- <interactivity:FluidMoveBehavior.EaseX>
- <CubicEase EasingMode="EaseOut" />
- </interactivity:FluidMoveBehavior.EaseX>
- </interactivity:FluidMoveBehavior>
- </interactivity:Interaction.Behaviors>
- </hc:TabPanel>
- </Border>
- </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" />
- </Border.CacheMode>
- <StackPanel Orientation="Horizontal">
- <RepeatButton Focusable="False" Visibility="{TemplateBinding ShowScrollButton,Converter={StaticResource Boolean2VisibilityConverter}}" Style="{StaticResource RepeatButtonIcon}" BorderThickness="0" hc:IconElement.Height="14" Padding="8 0" Height="Auto" VerticalAlignment="Stretch" Width="{StaticResource DefaultControlHeight}" 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" Padding="0" hc:IconElement.Width="14" Height="Auto" BorderThickness="0" Background="{DynamicResource SecondaryRegionBrush}" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}" />
- </StackPanel>
- </Border>
- <Border x:Name="contentPanel" Background="{DynamicResource SecondaryRegionBrush}" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3">
- <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}" />
- <Style.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsScrollable" Value="True" />
- <Condition Property="IsTabFillEnabled" Value="False" />
- </MultiTrigger.Conditions>
- <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>
|