|
20 | 20 | <Setter.Value> |
21 | 21 | <ControlTemplate TargetType="{x:Type TabItem}"> |
22 | 22 | <controls:SmallPanel Background="{TemplateBinding Background}"> |
23 | | - <Border |
24 | | - x:Name="PART_Border" |
25 | | - BorderThickness="{TemplateBinding BorderThickness}" |
26 | | - RenderTransformOrigin=".5,.5"> |
27 | | - <Border.RenderTransform> |
28 | | - <ScaleTransform ScaleX="0" ScaleY="1" /> |
29 | | - </Border.RenderTransform> |
30 | | - </Border> |
| 23 | + <Border x:Name="PART_Border" BorderThickness="{TemplateBinding BorderThickness}" /> |
31 | 24 | <ContentPresenter |
32 | 25 | x:Name="PART_ContentPresenter" |
33 | 26 | Margin="{TemplateBinding Padding}" |
34 | 27 | HorizontalAlignment="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" |
35 | 28 | VerticalAlignment="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" |
36 | 29 | ContentSource="Header" |
37 | 30 | SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
38 | | - <VisualStateManager.VisualStateGroups> |
39 | | - <VisualStateGroup x:Name="SelectionStates"> |
40 | | - <VisualState x:Name="Unselected" /> |
41 | | - <VisualState x:Name="Selected"> |
42 | | - <Storyboard> |
43 | | - <DoubleAnimation |
44 | | - Storyboard.TargetName="PART_Border" |
45 | | - Storyboard.TargetProperty="(Border.RenderTransform).(ScaleTransform.ScaleX)" |
46 | | - To="1" |
47 | | - Duration="00:00:.2" /> |
48 | | - </Storyboard> |
49 | | - </VisualState> |
50 | | - </VisualStateGroup> |
51 | | - </VisualStateManager.VisualStateGroups> |
52 | 31 | </controls:SmallPanel> |
53 | 32 | <ControlTemplate.Triggers> |
54 | 33 | <Trigger Property="IsSelected" Value="True"> |
|
65 | 44 | </Setter> |
66 | 45 | </Style> |
67 | 46 |
|
68 | | - <Style |
69 | | - x:Key="WD.BaseLAndRTabItem" |
70 | | - BasedOn="{StaticResource WD.ControlBasicStyle}" |
71 | | - TargetType="{x:Type TabItem}"> |
72 | | - <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
73 | | - <Setter Property="VerticalContentAlignment" Value="Stretch" /> |
74 | | - <Setter Property="Background" Value="Transparent" /> |
75 | | - <Setter Property="Padding" Value="{StaticResource WD.DefaultPadding}" /> |
76 | | - <Setter Property="BorderThickness" Value="{StaticResource WD.TabItemBorderThickness}" /> |
77 | | - <Setter Property="HorizontalContentAlignment" Value="Center" /> |
78 | | - <Setter Property="VerticalContentAlignment" Value="Center" /> |
79 | | - <Setter Property="Template"> |
80 | | - <Setter.Value> |
81 | | - <ControlTemplate TargetType="{x:Type TabItem}"> |
82 | | - <controls:SmallPanel Background="{TemplateBinding Background}"> |
83 | | - <Border |
84 | | - x:Name="PART_Border" |
85 | | - BorderThickness="{TemplateBinding BorderThickness}" |
86 | | - RenderTransformOrigin=".5,.5"> |
87 | | - <Border.RenderTransform> |
88 | | - <ScaleTransform ScaleX="1" ScaleY="0" /> |
89 | | - </Border.RenderTransform> |
90 | | - </Border> |
91 | | - <ContentPresenter |
92 | | - x:Name="PART_ContentPresenter" |
93 | | - Margin="{TemplateBinding Padding}" |
94 | | - HorizontalAlignment="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" |
95 | | - VerticalAlignment="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" |
96 | | - ContentSource="Header" |
97 | | - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
98 | | - <VisualStateManager.VisualStateGroups> |
99 | | - <VisualStateGroup x:Name="SelectionStates"> |
100 | | - <VisualState x:Name="Unselected" /> |
101 | | - <VisualState x:Name="Selected"> |
102 | | - <Storyboard> |
103 | | - <DoubleAnimation |
104 | | - Storyboard.TargetName="PART_Border" |
105 | | - Storyboard.TargetProperty="(Border.RenderTransform).(ScaleTransform.ScaleY)" |
106 | | - To="1" |
107 | | - Duration="00:00:.2" /> |
108 | | - </Storyboard> |
109 | | - </VisualState> |
110 | | - </VisualStateGroup> |
111 | | - </VisualStateManager.VisualStateGroups> |
112 | | - </controls:SmallPanel> |
113 | | - <ControlTemplate.Triggers> |
114 | | - <Trigger Property="IsSelected" Value="True"> |
115 | | - <Setter TargetName="PART_Border" Property="BorderBrush" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" /> |
116 | | - <Setter Property="Background" Value="{DynamicResource WD.DefaultBackgroundSolidColorBrush}" /> |
117 | | - <Setter TargetName="PART_ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" /> |
118 | | - </Trigger> |
119 | | - <Trigger Property="IsMouseOver" Value="True"> |
120 | | - <Setter TargetName="PART_ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" /> |
121 | | - </Trigger> |
122 | | - </ControlTemplate.Triggers> |
123 | | - </ControlTemplate> |
124 | | - </Setter.Value> |
125 | | - </Setter> |
126 | | - </Style> |
127 | 47 | <Style |
128 | 48 | x:Key="WD.LeftTabItem" |
129 | | - BasedOn="{StaticResource WD.BaseLAndRTabItem}" |
| 49 | + BasedOn="{StaticResource WD.BaseTAndBTabItem}" |
130 | 50 | TargetType="{x:Type TabItem}"> |
131 | 51 | <Setter Property="BorderThickness" Value="0,0,2,0" /> |
132 | 52 | </Style> |
133 | 53 | <Style |
134 | 54 | x:Key="WD.RightTabItem" |
135 | | - BasedOn="{StaticResource WD.BaseLAndRTabItem}" |
| 55 | + BasedOn="{StaticResource WD.BaseTAndBTabItem}" |
136 | 56 | TargetType="{x:Type TabItem}"> |
137 | 57 | <Setter Property="BorderThickness" Value="2,0,0,0" /> |
138 | 58 | </Style> |
|
170 | 90 | BorderBrush="{TemplateBinding BorderBrush}" |
171 | 91 | BorderThickness="{TemplateBinding BorderThickness}" |
172 | 92 | CornerRadius="{Binding Path=(helpers:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"> |
173 | | - <Grid Clip="{Binding RelativeSource={RelativeSource AncestorType=controls:WDBorder}, Path=ContentClip}"> |
| 93 | + <Grid |
| 94 | + Clip="{Binding RelativeSource={RelativeSource AncestorType=controls:WDBorder}, Path=ContentClip}" |
| 95 | + KeyboardNavigation.TabNavigation="Local" |
| 96 | + SnapsToDevicePixels="True"> |
174 | 97 | <Grid.ColumnDefinitions> |
175 | | - <ColumnDefinition Name="ColumnDefinition0" /> |
176 | | - <ColumnDefinition Name="ColumnDefinition1" Width="0" /> |
| 98 | + <ColumnDefinition x:Name="ColumnDefinition0" /> |
| 99 | + <ColumnDefinition x:Name="ColumnDefinition1" Width="0" /> |
177 | 100 | </Grid.ColumnDefinitions> |
178 | 101 | <Grid.RowDefinitions> |
179 | | - <RowDefinition Name="RowDefinition0" Height="Auto" /> |
180 | | - <RowDefinition Name="RowDefinition1" Height="*" /> |
| 102 | + <RowDefinition x:Name="RowDefinition0" Height="Auto" /> |
| 103 | + <RowDefinition x:Name="RowDefinition1" Height="*" /> |
181 | 104 | </Grid.RowDefinitions> |
182 | 105 | <Border |
183 | 106 | x:Name="HeaderBorder" |
|
223 | 146 | <Setter Property="ItemContainerStyle" Value="{StaticResource WD.BottomTabItem}" /> |
224 | 147 | </Trigger> |
225 | 148 | <Trigger Property="TabControl.TabStripPlacement" Value="Left"> |
226 | | - <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" /> |
227 | | - <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" /> |
228 | 149 | <Setter TargetName="ColumnDefinition0" Property="ColumnDefinition.Width" Value="Auto" /> |
229 | 150 | <Setter TargetName="ColumnDefinition1" Property="ColumnDefinition.Width" Value="*" /> |
| 151 | + <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" /> |
| 152 | + <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" /> |
230 | 153 | <Setter TargetName="RowDefinition0" Property="RowDefinition.Height" Value="*" /> |
231 | 154 | <Setter TargetName="RowDefinition1" Property="RowDefinition.Height" Value="0" /> |
232 | 155 | <Setter TargetName="HeaderBorder" Property="BorderThickness" Value="0,0,1,0" /> |
|
0 commit comments