|
34 | 34 | BorderBrush="{TemplateBinding BorderBrush}" |
35 | 35 | BorderThickness="{TemplateBinding BorderThickness}" |
36 | 36 | SnapsToDevicePixels="True"> |
37 | | - <Grid> |
38 | | - <!-- Ghost: always SemiBold — reserves bold width so item never jumps --> |
39 | | - <ContentPresenter |
40 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
41 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
42 | | - IsHitTestVisible="False" |
43 | | - TextElement.FontWeight="SemiBold" |
44 | | - Visibility="Hidden" /> |
45 | | - <ContentPresenter |
46 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
47 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
48 | | - RecognizesAccessKey="True" /> |
49 | | - </Grid> |
| 37 | + <ContentPresenter |
| 38 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 39 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 40 | + RecognizesAccessKey="True" /> |
50 | 41 | </Border> |
51 | 42 | <ControlTemplate.Triggers> |
52 | 43 | <!-- Selected --> |
53 | 44 | <Trigger Property="IsSelected" Value="True"> |
54 | 45 | <Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" /> |
55 | | - <Setter Property="FontWeight" Value="SemiBold" /> |
56 | 46 | <Setter Property="BorderBrush" Value="{DynamicResource AccentFillColorDefaultBrush}" /> |
57 | 47 | </Trigger> |
| 48 | + <MultiDataTrigger> |
| 49 | + <MultiDataTrigger.Conditions> |
| 50 | + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" Value="True" /> |
| 51 | + <Condition Binding="{Binding IsSelectedItemBold, RelativeSource={RelativeSource AncestorType={x:Type local:TabStrip}}}" Value="True" /> |
| 52 | + </MultiDataTrigger.Conditions> |
| 53 | + <Setter Property="FontWeight" Value="SemiBold" /> |
| 54 | + </MultiDataTrigger> |
58 | 55 | <!-- Hover (not selected) --> |
59 | 56 | <MultiTrigger> |
60 | 57 | <MultiTrigger.Conditions> |
|
165 | 162 | BorderThickness="{TemplateBinding BorderThickness}" |
166 | 163 | CornerRadius="4,4,0,0" |
167 | 164 | SnapsToDevicePixels="True"> |
168 | | - <Grid> |
169 | | - <!-- Ghost: always SemiBold — reserves bold width so item never jumps --> |
170 | | - <ContentPresenter |
171 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
172 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
173 | | - IsHitTestVisible="False" |
174 | | - TextElement.FontWeight="SemiBold" |
175 | | - Visibility="Hidden" /> |
176 | | - <ContentPresenter |
177 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
178 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
179 | | - RecognizesAccessKey="True" /> |
180 | | - </Grid> |
| 165 | + <ContentPresenter |
| 166 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 167 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 168 | + RecognizesAccessKey="True" /> |
181 | 169 | </Border> |
182 | 170 | <ControlTemplate.Triggers> |
183 | 171 | <!-- Selected: show 3-sided border + card bg + overlap separator by 1 px --> |
184 | 172 | <Trigger Property="IsSelected" Value="True"> |
185 | 173 | <Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" /> |
186 | | - <Setter Property="FontWeight" Value="SemiBold" /> |
187 | 174 | <Setter TargetName="Root" Property="BorderThickness" Value="1,1,1,0" /> |
188 | 175 | <Setter TargetName="Root" Property="Background" Value="{DynamicResource LayerFillColorDefaultBrush}" /> |
189 | 176 | <!-- Extend 1 px below to cover the separator line --> |
190 | 177 | <Setter TargetName="Root" Property="Margin" Value="0,0,0,-1" /> |
191 | 178 | </Trigger> |
| 179 | + <MultiDataTrigger> |
| 180 | + <MultiDataTrigger.Conditions> |
| 181 | + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" Value="True" /> |
| 182 | + <Condition Binding="{Binding IsSelectedItemBold, RelativeSource={RelativeSource AncestorType={x:Type local:TabStrip}}}" Value="True" /> |
| 183 | + </MultiDataTrigger.Conditions> |
| 184 | + <Setter Property="FontWeight" Value="SemiBold" /> |
| 185 | + </MultiDataTrigger> |
192 | 186 | <!-- Hover (not selected) --> |
193 | 187 | <MultiTrigger> |
194 | 188 | <MultiTrigger.Conditions> |
|
251 | 245 | BorderThickness="{TemplateBinding BorderThickness}" |
252 | 246 | CornerRadius="{DynamicResource ControlCornerRadius}" |
253 | 247 | SnapsToDevicePixels="True"> |
254 | | - <Grid> |
255 | | - <!-- Ghost: always SemiBold — reserves bold width so item never jumps --> |
256 | | - <ContentPresenter |
257 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
258 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
259 | | - IsHitTestVisible="False" |
260 | | - TextElement.FontWeight="SemiBold" |
261 | | - Visibility="Hidden" /> |
262 | | - <ContentPresenter |
263 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
264 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
265 | | - RecognizesAccessKey="True" /> |
266 | | - </Grid> |
| 248 | + <ContentPresenter |
| 249 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 250 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 251 | + RecognizesAccessKey="True" /> |
267 | 252 | </Border> |
268 | 253 | <ControlTemplate.Triggers> |
269 | 254 | <!-- Selected: accent highlight inside the card shell --> |
270 | 255 | <Trigger Property="IsSelected" Value="True"> |
271 | 256 | <Setter TargetName="Root" Property="Background" Value="{DynamicResource AccentFillColorDefaultBrush}" /> |
272 | 257 | <Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" /> |
273 | | - <Setter Property="FontWeight" Value="SemiBold" /> |
274 | 258 | </Trigger> |
| 259 | + <MultiDataTrigger> |
| 260 | + <MultiDataTrigger.Conditions> |
| 261 | + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" Value="True" /> |
| 262 | + <Condition Binding="{Binding IsSelectedItemBold, RelativeSource={RelativeSource AncestorType={x:Type local:TabStrip}}}" Value="True" /> |
| 263 | + </MultiDataTrigger.Conditions> |
| 264 | + <Setter Property="FontWeight" Value="SemiBold" /> |
| 265 | + </MultiDataTrigger> |
275 | 266 | <!-- Hover (not selected) --> |
276 | 267 | <MultiTrigger> |
277 | 268 | <MultiTrigger.Conditions> |
|
0 commit comments