|
6 | 6 | <ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/TabbedCommandBar/TabbedCommandBarItem.xaml" />
|
7 | 7 | </ResourceDictionary.MergedDictionaries>
|
8 | 8 |
|
| 9 | + <SolidColorBrush x:Key="ContextualTabBackground" Color="{StaticResource SystemAltMediumColor}"/> |
| 10 | + |
9 | 11 | <DataTemplate x:Key="NormalTabTemplate">
|
10 |
| - <NavigationViewItem Content="{Binding Header}" /> |
| 12 | + <NavigationViewItem Content="{Binding Header}" Visibility="{Binding Visibility}"/> |
11 | 13 | </DataTemplate>
|
12 | 14 | <DataTemplate x:Key="ContextualTabTemplate">
|
13 |
| - <NavigationViewItem Content="{Binding Header}"> |
| 15 | + <NavigationViewItem Content="{Binding Header}" Background="{StaticResource ContextualTabBackground}" Visibility="{Binding Visibility}"> |
14 | 16 | <NavigationViewItem.Resources>
|
15 | 17 | <SolidColorBrush x:Key="TopNavigationViewItemForeground" Color="{ThemeResource SystemAccentColor}" />
|
16 | 18 | <SolidColorBrush x:Key="TopNavigationViewItemForegroundSelected" Color="{ThemeResource SystemAccentColor}" />
|
17 | 19 | <SolidColorBrush x:Key="TopNavigationViewItemForegroundPointerOver" Color="{ThemeResource SystemAccentColorLight2}" />
|
18 | 20 | <SolidColorBrush x:Key="TopNavigationViewItemForegroundPressed" Color="{ThemeResource SystemAccentColorLight2}" />
|
| 21 | + |
| 22 | + <!-- TODO: Set BackgroundSelected to match ContextualTabBackground --> |
| 23 | + <!--<StaticResource x:Key="TopNavigationViewItemBackgroundSelected" ResourceKey="ContextualTabBackgroundColor" />--> |
19 | 24 | </NavigationViewItem.Resources>
|
20 | 25 | </NavigationViewItem>
|
21 | 26 | </DataTemplate>
|
|
267 | 272 | </Grid>
|
268 | 273 |
|
269 | 274 |
|
270 |
| - <Border x:Name="PART_RibbonContentBorder" |
271 |
| - Background="{TemplateBinding ItemBackground}" Grid.Row="1" |
| 275 | + <Border x:Name="PART_RibbonContentBorder" Grid.Row="1" |
272 | 276 | VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
273 | 277 | <ContentControl x:Name="PART_RibbonContent" Content="{TemplateBinding SelectedItem}"
|
274 | 278 | HorizontalContentAlignment="Stretch">
|
275 | 279 | <ContentControl.Resources>
|
276 | 280 | <Storyboard x:Name="TabChangedStoryboard">
|
277 | 281 | <PopInThemeAnimation TargetName="PART_RibbonContent"/>
|
278 | 282 | </Storyboard>
|
| 283 | + |
| 284 | + <!--FIXME: Ideally, these resources would be set by the TabbedCommandBarItem, |
| 285 | + but there isn't a way to do that without duplicating the CommandBar template.--> |
279 | 286 | <Style TargetType="AppBarElementContainer">
|
280 | 287 | <Setter Property="VerticalAlignment" Value="Stretch" />
|
281 | 288 | <Setter Property="VerticalContentAlignment" Value="Center" />
|
282 | 289 | <Setter Property="Margin" Value="1,0" />
|
283 | 290 | </Style>
|
| 291 | + <Style TargetType="SplitButton" BasedOn="{StaticResource AppBarSplitButtonStyle}"/> |
284 | 292 | </ContentControl.Resources>
|
285 | 293 | </ContentControl>
|
286 | 294 | </Border>
|
|
0 commit comments