123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl">
- <Style x:Key="TabControlWithUnderLineStyle" TargetType="{x:Type TabControl}">
- <Setter Property="Padding" Value="2" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="#FFACACAC" />
- <Setter Property="BorderThickness" Value="0,0,0,1" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabControl}">
- <Grid
- x:Name="templateRoot"
- ClipToBounds="True"
- KeyboardNavigation.TabNavigation="Local"
- 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>
- <!-- 加滑轨配合滑轨样式可实现箭头左右滚动的菜单栏 -->
- <!--<ScrollViewer Margin="140 0 140 0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">-->
- <TabPanel
- x:Name="HeaderPanel"
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
- VerticalAlignment="{TemplateBinding VerticalAlignment}"
- Panel.ZIndex="1"
- Background="Transparent"
- IsItemsHost="True"
- KeyboardNavigation.TabIndex="1" />
- <!--</ScrollViewer>-->
- <!-- 页头和中间内容的分割线 -->
- <Line
- Margin="0,0,0,1"
- VerticalAlignment="Bottom"
- SnapsToDevicePixels="True"
- Stroke="#E7E9EC"
- StrokeThickness="0"
- X1="0"
- X2="{Binding ActualWidth, RelativeSource={RelativeSource Self}}" />
- <Border
- x:Name="ContentPanel"
- Grid.Row="1"
- Grid.Column="0"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- KeyboardNavigation.DirectionalNavigation="Contained"
- KeyboardNavigation.TabIndex="2"
- KeyboardNavigation.TabNavigation="Local">
- <ContentPresenter
- x:Name="PART_SelectedContentHost"
- Margin="0"
- VerticalAlignment="Stretch"
- Content="{TemplateBinding SelectedContent}"
- ContentSource="SelectedContent"
- ContentStringFormat="{TemplateBinding SelectedContentStringFormat}"
- ContentTemplate="{TemplateBinding SelectedContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="TabStripPlacement" Value="Bottom">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Left">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
- <Setter TargetName="HeaderPanel" Property="VerticalAlignment" Value="Top" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Right">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Cycle" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="Cycle" />
- </Style>
- <!-- Design Token -->
- <Style x:Key="ToolbarTabs" TargetType="{x:Type cus:IconAndTextTabItem}">
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
- <Setter Property="Background" Value="White" />
- <Setter Property="BorderBrush" Value="#FFACACAC" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="AllowDrop" Value="True" />
- <Setter Property="SelectedForeground" Value="{StaticResource color.sys.text.neutral.lv1}" />
- <Setter Property="FontSize" Value="14" />
- <Setter Property="Height" Value="40" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type cus:IconAndTextTabItem}">
- <Grid
- x:Name="templateRoot"
- Margin="{TemplateBinding Padding}"
- Background="Transparent"
- SnapsToDevicePixels="True">
- <Border
- x:Name="_underline"
- Height="3"
- Margin="9,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Bottom"
- Background="{StaticResource color.sys.layout.accent}"
- CornerRadius="2"
- Visibility="Collapsed" />
- <StackPanel Orientation="Horizontal">
- <Path
- x:Name="NormalPathIcon"
- MaxWidth="20"
- MaxHeight="20"
- Margin="0,0,4,0"
- Data="{Binding NormalPathIcon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
- Fill="Black"
- Visibility="Visible" />
- <Path
- x:Name="SelectedIcon"
- MaxWidth="20"
- MaxHeight=" 20"
- Margin="0,0,4,0"
- Data="{Binding SelectedIcon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
- Visibility="Collapsed" />
- <TextBlock
- x:Name="txt"
- Margin="0,0,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14"
- Foreground="{TemplateBinding Foreground}"
- Text="{TemplateBinding Header}"
- TextTrimming="CharacterEllipsis"
- ToolTip="{TemplateBinding Header}"
- Visibility="Visible" />
- </StackPanel>
- </Grid>
- <ControlTemplate.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Top" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="SelectedIcon" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="NormalPathIcon" Property="Visibility" Value="Visible" />
- <Setter TargetName="txt" Property="Foreground" Value="#FF000000" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Left" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="templateRoot" Property="Opacity" Value="0.56" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Bottom" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="templateRoot" Property="Opacity" Value="0.56" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Right" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="templateRoot" Property="Opacity" Value="0.56" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Top" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="templateRoot" Property="Opacity" Value="0.56" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Top" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="NormalPathIcon" Property="Opacity" Value="0.56" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Top" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Panel.ZIndex" Value="1" />
- <Setter TargetName="txt" Property="Foreground" Value="{Binding SelectedForeground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
- <Setter TargetName="txt" Property="TextBlock.FontWeight" Value="SemiBold" />
- <Setter TargetName="_underline" Property="Visibility" Value="Visible" />
- <Setter TargetName="SelectedIcon" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="NormalPathIcon" Property="Visibility" Value="Visible" />
- </MultiDataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="BOTATab" TargetType="{x:Type cus:IconAndTextTabItem}">
- <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.norm.lv1}" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="#FFACACAC" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="SelectedForeground" Value="{StaticResource color.icon.base.brand}" />
- <Setter Property="FontSize" Value="14" />
- <Setter Property="Height" Value="40" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Padding" Value="0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type cus:IconAndTextTabItem}">
- <Grid
- x:Name="templateRoot"
- Margin="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- SnapsToDevicePixels="True">
- <Border
- x:Name="_underline"
- Height="3"
- Margin="9,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Bottom"
- Background="{StaticResource color.sys.layout.accent}"
- CornerRadius="2"
- Visibility="Collapsed" />
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <Path
- x:Name="NormalPathIcon"
- Width="20"
- Height="20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="{Binding NormalPathIcon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
- Fill="{TemplateBinding Foreground}"
- Visibility="Visible" />
- <Path
- x:Name="SelectedIcon"
- Width="20"
- Height="20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="{Binding SelectedIcon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
- Fill="{TemplateBinding SelectedForeground}"
- Visibility="Collapsed" />
- <TextBlock
- x:Name="txt"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="{TemplateBinding Foreground}"
- Text="{TemplateBinding Header}"
- TextTrimming="CharacterEllipsis"
- ToolTip="{TemplateBinding Header}"
- Visibility="Collapsed" />
- </StackPanel>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
- <Setter TargetName="NormalPathIcon" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="SelectedIcon" Property="Visibility" Value="Visible" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- Design Token TabItem ControlTemplate for Forms Property Title -->
- <ControlTemplate x:Key="Segmented" TargetType="{x:Type TabItem}">
- <Grid x:Name="templateRoot" SnapsToDevicePixels="True">
- <Border
- x:Name="mainBorder"
- Margin="0"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="0">
- <Border
- x:Name="innerBorder"
- Height="28"
- Margin="-1"
- Background="White"
- BorderBrush="#FFACACAC"
- BorderThickness="0"
- CornerRadius="4"
- Opacity="0" />
- </Border>
- <ContentPresenter
- x:Name="contentPresenter"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"
- VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"
- Content="{TemplateBinding Header}"
- ContentSource="Header"
- ContentStringFormat="{TemplateBinding HeaderStringFormat}"
- ContentTemplate="{TemplateBinding HeaderTemplate}"
- Focusable="False"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- <ControlTemplate.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Left" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="mainBorder" Property="Background">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0" Color="#FFECF4FC" />
- <GradientStop Offset="1" Color="#FFDCECFC" />
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter TargetName="mainBorder" Property="BorderBrush" Value="#FF7EB4EA" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,1,0,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,1,0,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Bottom" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="mainBorder" Property="Background">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0" Color="#FFECF4FC" />
- <GradientStop Offset="1" Color="#FFDCECFC" />
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter TargetName="mainBorder" Property="BorderBrush" Value="#FF7EB4EA" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,0,1,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,0,1,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Right" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="mainBorder" Property="Background">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0" Color="#FFECF4FC" />
- <GradientStop Offset="1" Color="#FFDCECFC" />
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter TargetName="mainBorder" Property="BorderBrush" Value="#FF7EB4EA" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="0,1,1,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="0,1,1,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Top" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="mainBorder" Property="Background">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0" Color="#FFECF4FC" />
- <GradientStop Offset="1" Color="#FFDCECFC" />
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Setter TargetName="mainBorder" Property="BorderBrush" Value="#FF7EB4EA" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,1,1,0" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,1,1,0" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Left" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="contentPresenter" Property="Opacity" Value="0.56" />
- <Setter TargetName="mainBorder" Property="Background" Value="#FFF0F0F0" />
- <Setter TargetName="mainBorder" Property="BorderBrush" Value="#FFD9D9D9" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,1,0,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,1,0,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Bottom" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="contentPresenter" Property="Opacity" Value="0.56" />
- <Setter TargetName="mainBorder" Property="Background" Value="#FFF0F0F0" />
- <Setter TargetName="mainBorder" Property="BorderBrush" Value="#FFD9D9D9" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,0,1,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,0,1,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Right" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="contentPresenter" Property="Opacity" Value="0.56" />
- <Setter TargetName="mainBorder" Property="Background" Value="#FFF0F0F0" />
- <Setter TargetName="mainBorder" Property="BorderBrush" Value="#FFD9D9D9" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="0,1,1,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="0,1,1,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Top" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="contentPresenter" Property="Opacity" Value="0.56" />
- <Setter TargetName="mainBorder" Property="Background" Value="#FFF0F0F0" />
- <Setter TargetName="mainBorder" Property="BorderBrush" Value="#FFD9D9D9" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,1,1,0" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,1,1,0" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Left" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,1,0,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,1,0,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Left" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Panel.ZIndex" Value="1" />
- <Setter Property="Margin" Value="-2,-2,0,-2" />
- <Setter TargetName="innerBorder" Property="Opacity" Value="1" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,1,0,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,1,0,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Bottom" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,0,1,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,0,1,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Bottom" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Panel.ZIndex" Value="1" />
- <Setter Property="Margin" Value="-2,0,-2,-2" />
- <Setter TargetName="innerBorder" Property="Opacity" Value="1" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="1,0,1,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="1,0,1,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Right" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="0,1,1,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="0,1,1,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Right" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Panel.ZIndex" Value="1" />
- <Setter Property="Margin" Value="0,-2,-2,-2" />
- <Setter TargetName="innerBorder" Property="Opacity" Value="1" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="0,1,1,1" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="0,1,1,1" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Top" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="0" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="0" />
- <Setter TargetName="mainBorder" Property="Background" Value="Transparent" />
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true" />
- <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="Top" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Panel.ZIndex" Value="1" />
- <Setter Property="Margin" Value="0" />
- <Setter TargetName="innerBorder" Property="Opacity" Value="1" />
- <Setter TargetName="innerBorder" Property="BorderThickness" Value="0" />
- <Setter TargetName="mainBorder" Property="BorderThickness" Value="0" />
- <Setter TargetName="mainBorder" Property="Background" Value="Transparent" />
- </MultiDataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <!-- design token TabHeader for Forms Property -->
- <Style x:Key="FormTabControl" TargetType="{x:Type TabControl}">
- <Setter Property="Padding" Value="2" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabControl}">
- <Grid
- x:Name="templateRoot"
- ClipToBounds="true"
- KeyboardNavigation.TabNavigation="Local"
- 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>
- <Border
- Grid.Row="0"
- Grid.Column="0"
- HorizontalAlignment="Center"
- Background="{StaticResource color.sys.layout.fg.dark}"
- CornerRadius="4">
- <TabPanel
- x:Name="headerPanel"
- Margin="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Panel.ZIndex="1"
- Background="Transparent"
- IsItemsHost="true"
- KeyboardNavigation.TabIndex="1" />
- </Border>
- <Border
- x:Name="contentPanel"
- Grid.Row="1"
- Grid.Column="0"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- KeyboardNavigation.DirectionalNavigation="Contained"
- KeyboardNavigation.TabIndex="2"
- KeyboardNavigation.TabNavigation="Local">
- <ContentPresenter
- x:Name="PART_SelectedContentHost"
- Margin="{TemplateBinding Padding}"
- ContentSource="SelectedContent"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="TabStripPlacement" Value="Bottom">
- <Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
- <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="Margin" Value="2,0,2,2" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Left">
- <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
- <Setter TargetName="headerPanel" Property="Margin" Value="2,2,0,2" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Right">
- <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
- <Setter TargetName="headerPanel" Property="Margin" Value="0,2,2,2" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="InfoTabControl" TargetType="{x:Type TabControl}">
- <Setter Property="Padding" Value="8" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabControl}">
- <Grid
- x:Name="templateRoot"
- ClipToBounds="true"
- KeyboardNavigation.TabNavigation="Local"
- SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition x:Name="ColumnDefinition0" Width="200" />
- <ColumnDefinition x:Name="ColumnDefinition1" Width="500" />
- </Grid.ColumnDefinitions>
- <Border
- Grid.Column="0"
- Width="200"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Background="{StaticResource color.sys.layout.mg}"
- BorderThickness="1"
- CornerRadius="4">
- <TabPanel
- x:Name="headerPanel"
- Width="180"
- HorizontalAlignment="Center"
- VerticalAlignment="Stretch"
- Panel.ZIndex="1"
- Background="Transparent"
- IsItemsHost="true"
- KeyboardNavigation.TabIndex="1" />
- </Border>
- <Border
- x:Name="contentPanel"
- Grid.Column="1"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- KeyboardNavigation.DirectionalNavigation="Contained"
- KeyboardNavigation.TabIndex="2"
- KeyboardNavigation.TabNavigation="Local">
- <ContentPresenter
- x:Name="PART_SelectedContentHost"
- Margin="{TemplateBinding Margin}"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- ContentSource="SelectedContent"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="TabStripPlacement" Value="Bottom">
- <Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
- <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="headerPanel" Property="Margin" Value="2,0,2,2" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Left">
- <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
- <Setter TargetName="headerPanel" Property="Margin" Value="2,2,0,2" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Right">
- <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
- <Setter TargetName="headerPanel" Property="Margin" Value="0,2,2,2" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="InfoTabItem" TargetType="{x:Type TabItem}">
- <Setter Property="Height" Value="50" />
- <Setter Property="Width" Value="200" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabItem}">
- <Grid>
- <Border
- Name="Border"
- Height="32"
- Padding="8,0"
- Background="Transparent"
- BorderBrush="Transparent"
- BorderThickness="1"
- CornerRadius="4">
- <ContentPresenter
- x:Name="ContentSite"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- ContentSource="Header"
- RecognizesAccessKey="True" />
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Panel.ZIndex" Value="100" />
- <Setter TargetName="Border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
- <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
- </Trigger>
- <Trigger Property="IsSelected" Value="False">
- <Setter Property="Panel.ZIndex" Value="100" />
- <Setter TargetName="Border" Property="Background" Value="Transparent" />
- <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--<Style x:Key="InfoTabItem" TargetType="{x:Type TabItem}">
- <Setter Property="HeaderTemplate">
- <Setter.Value>
- -->
- <!--<DataTemplate>
- <DataTemplate.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter TargetName="img" Property="Source" Value="images/customimage.png" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>-->
- <!--
- <ControlTemplate TargetType="{x:Type TabItem}">
- <ContentPresenter />
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter TargetName="img" Property="Source" Value="images/customimage.png" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>-->
- </ResourceDictionary>
|