|
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
3 | 3 | xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls">
|
4 | 4 |
|
| 5 | + <SolidColorBrush x:Key="ContextualTabBackground" Color="{StaticResource SystemAltMediumColor}"/> |
| 6 | + |
5 | 7 | <Style BasedOn="{StaticResource DefaultTabbedCommandBarItemStyle}" TargetType="controls:TabbedCommandBarItem"/>
|
6 | 8 |
|
7 | 9 | <Style x:Key="DefaultTabbedCommandBarItemStyle" BasedOn="{StaticResource CommandBarRevealStyle}" TargetType="controls:TabbedCommandBarItem">
|
|
22 | 24 | <Setter Property="Background" Value="{ThemeResource SystemControlChromeLowAcrylicWindowBrush}"/>
|
23 | 25 | </Style>
|
24 | 26 |
|
| 27 | + <DataTemplate x:Key="NormalTabTemplate"> |
| 28 | + <NavigationViewItem Content="{Binding Header}" Visibility="{Binding Visibility}"/> |
| 29 | + </DataTemplate> |
| 30 | + <DataTemplate x:Key="ContextualTabTemplate"> |
| 31 | + <NavigationViewItem Content="{Binding Header}" Background="{StaticResource ContextualTabBackground}" Visibility="{Binding Visibility}"> |
| 32 | + <NavigationViewItem.Resources> |
| 33 | + <SolidColorBrush x:Key="TopNavigationViewItemForeground" Color="{ThemeResource SystemAccentColor}" /> |
| 34 | + <SolidColorBrush x:Key="TopNavigationViewItemForegroundSelected" Color="{ThemeResource SystemAccentColor}" /> |
| 35 | + <SolidColorBrush x:Key="TopNavigationViewItemForegroundPointerOver" Color="{ThemeResource SystemAccentColorLight2}" /> |
| 36 | + <SolidColorBrush x:Key="TopNavigationViewItemForegroundPressed" Color="{ThemeResource SystemAccentColorLight2}" /> |
| 37 | + |
| 38 | + <!-- TODO: Set BackgroundSelected to match ContextualTabBackground --> |
| 39 | + <!--<StaticResource x:Key="TopNavigationViewItemBackgroundSelected" ResourceKey="ContextualTabBackgroundColor" />--> |
| 40 | + </NavigationViewItem.Resources> |
| 41 | + </NavigationViewItem> |
| 42 | + </DataTemplate> |
| 43 | + <controls:TabbedCommandBarItemTemplateSelector x:Key="DefaultTabbedCommandBarItemTemplateSelector" |
| 44 | + Contextual="{StaticResource ContextualTabTemplate}" |
| 45 | + Normal="{StaticResource NormalTabTemplate}" /> |
| 46 | + |
25 | 47 | <Style x:Key="AppBarSplitButtonStyle" TargetType="SplitButton">
|
26 | 48 | <Setter Property="Background" Value="{ThemeResource AppBarButtonRevealBackground}" />
|
27 | 49 | <Setter Property="Foreground" Value="{ThemeResource SplitButtonForeground}" />
|
|
0 commit comments