|
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 | 5 | xmlns:local="using:Files.App.Controls"> |
6 | 6 |
|
| 7 | + <x:Double x:Key="BreadcrumbBarItemHeight">32</x:Double> |
| 8 | + |
7 | 9 | <Style BasedOn="{StaticResource DefaultBreadcrumbBarStyle}" TargetType="local:BreadcrumbBar" /> |
8 | 10 | <Style BasedOn="{StaticResource DefaultBreadcrumbBarItemStyle}" TargetType="local:BreadcrumbBarItem" /> |
9 | 11 |
|
|
31 | 33 | <Setter Property="FontSize" Value="{ThemeResource BreadcrumbBarItemThemeFontSize}" /> |
32 | 34 | <Setter Property="FontWeight" Value="{ThemeResource BreadcrumbBarItemFontWeight}" /> |
33 | 35 | <Setter Property="Foreground" Value="{ThemeResource BreadcrumbBarForegroundBrush}" /> |
| 36 | + <Setter Property="Height" Value="{ThemeResource BreadcrumbBarItemHeight}" /> |
34 | 37 | <Setter Property="HorizontalAlignment" Value="Stretch" /> |
35 | 38 | <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
36 | 39 | <Setter Property="IsTabStop" Value="True" /> |
37 | 40 | <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" /> |
38 | 41 | <Setter Property="VerticalAlignment" Value="Center" /> |
39 | 42 | <Setter Property="VerticalContentAlignment" Value="Center" /> |
40 | | - <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" /> |
| 43 | + <Setter Property="CornerRadius" Value="2" /> |
41 | 44 | <Setter Property="Template"> |
42 | 45 | <Setter.Value> |
43 | 46 | <ControlTemplate TargetType="local:BreadcrumbBarItem"> |
44 | | - <Grid x:Name="PART_LayoutRoot" CornerRadius="{TemplateBinding CornerRadius}"> |
| 47 | + <Grid x:Name="PART_LayoutRoot" ColumnSpacing="2"> |
45 | 48 | <Grid.ColumnDefinitions> |
46 | 49 | <ColumnDefinition x:Name="PART_ContentColumn" Width="Auto" /> |
47 | 50 | <ColumnDefinition x:Name="PART_ChevronColumn" Width="Auto" /> |
48 | 51 | </Grid.ColumnDefinitions> |
49 | 52 |
|
50 | 53 | <!-- Clickable Area --> |
51 | | - <Button |
| 54 | + <Border |
52 | 55 | x:Name="PART_ItemButton" |
| 56 | + Height="{TemplateBinding Height}" |
| 57 | + Padding="8,0" |
53 | 58 | AutomationProperties.AccessibilityView="Raw" |
54 | | - Background="{TemplateBinding Background}" |
55 | | - BorderBrush="{TemplateBinding BorderBrush}" |
56 | | - BorderThickness="{TemplateBinding BorderThickness}" |
57 | 59 | Control.IsTemplateFocusTarget="True" |
58 | 60 | CornerRadius="{TemplateBinding CornerRadius}" |
59 | 61 | FocusVisualMargin="-3" |
60 | 62 | IsTabStop="False"> |
| 63 | + <Border.BackgroundTransition> |
| 64 | + <BrushTransition Duration="0:0:0.083" /> |
| 65 | + </Border.BackgroundTransition> |
61 | 66 | <Grid AutomationProperties.AccessibilityView="Raw"> |
62 | 67 | <ContentPresenter |
63 | 68 | x:Name="PART_ItemContentPresenter" |
|
81 | 86 | Text="" |
82 | 87 | Visibility="Collapsed" /> |
83 | 88 | </Grid> |
84 | | - </Button> |
| 89 | + </Border> |
85 | 90 |
|
86 | 91 | <!-- Chevron --> |
87 | | - <TextBlock |
88 | | - x:Name="PART_ChevronTextBlock" |
| 92 | + <Border |
| 93 | + x:Name="PART_ChevronButton" |
89 | 94 | Grid.Column="1" |
90 | | - Padding="{ThemeResource BreadcrumbBarChevronPadding}" |
91 | | - HorizontalAlignment="Center" |
92 | | - VerticalAlignment="Center" |
93 | | - AutomationProperties.AccessibilityView="Raw" |
94 | | - FontFamily="{ThemeResource SymbolThemeFontFamily}" |
95 | | - FontSize="{ThemeResource BreadcrumbBarChevronFontSize}" |
96 | | - Foreground="{ThemeResource BreadcrumbBarNormalForegroundBrush}" |
97 | | - IsTextScaleFactorEnabled="False" |
98 | | - Text="" /> |
| 95 | + Padding="2,0" |
| 96 | + CornerRadius="{TemplateBinding CornerRadius}"> |
| 97 | + <Border.BackgroundTransition> |
| 98 | + <BrushTransition Duration="0:0:0.083" /> |
| 99 | + </Border.BackgroundTransition> |
| 100 | + <TextBlock |
| 101 | + x:Name="PART_ChevronTextBlock" |
| 102 | + Padding="{ThemeResource BreadcrumbBarChevronPadding}" |
| 103 | + HorizontalAlignment="Center" |
| 104 | + VerticalAlignment="Center" |
| 105 | + AutomationProperties.AccessibilityView="Raw" |
| 106 | + FontFamily="{ThemeResource SymbolThemeFontFamily}" |
| 107 | + FontSize="{ThemeResource BreadcrumbBarChevronFontSize}" |
| 108 | + Foreground="{ThemeResource BreadcrumbBarNormalForegroundBrush}" |
| 109 | + IsTextScaleFactorEnabled="False" |
| 110 | + Text="" /> |
| 111 | + </Border> |
99 | 112 |
|
100 | 113 | <VisualStateManager.VisualStateGroups> |
| 114 | + |
| 115 | + <VisualStateGroup x:Name="PointerStates"> |
| 116 | + <VisualState x:Name="PointerNormal" /> |
| 117 | + <VisualState x:Name="PointerOverItem"> |
| 118 | + <VisualState.Setters> |
| 119 | + <Setter Target="PART_ItemButton.Background" Value="{ThemeResource ControlFillColorSecondaryBrush}" /> |
| 120 | + <Setter Target="PART_ChevronButton.Background" Value="{ThemeResource ControlFillColorSecondaryBrush}" /> |
| 121 | + </VisualState.Setters> |
| 122 | + </VisualState> |
| 123 | + <VisualState x:Name="PointerOverChevron"> |
| 124 | + <VisualState.Setters> |
| 125 | + <Setter Target="PART_ChevronButton.Background" Value="{ThemeResource ControlFillColorSecondaryBrush}" /> |
| 126 | + </VisualState.Setters> |
| 127 | + </VisualState> |
| 128 | + <VisualState x:Name="PointerPressedOnItem"> |
| 129 | + <VisualState.Setters> |
| 130 | + <Setter Target="PART_ItemButton.Background" Value="{ThemeResource ControlFillColorTertiaryBrush}" /> |
| 131 | + <Setter Target="PART_ChevronButton.Background" Value="{ThemeResource ControlFillColorTertiaryBrush}" /> |
| 132 | + </VisualState.Setters> |
| 133 | + </VisualState> |
| 134 | + <VisualState x:Name="PointerPressedOnChevron"> |
| 135 | + <VisualState.Setters> |
| 136 | + <Setter Target="PART_ChevronButton.Background" Value="{ThemeResource ControlFillColorTertiaryBrush}" /> |
| 137 | + </VisualState.Setters> |
| 138 | + </VisualState> |
| 139 | + </VisualStateGroup> |
| 140 | + |
101 | 141 | <VisualStateGroup x:Name="ItemTypeStates"> |
102 | 142 | <VisualState x:Name="DefaultItemType" /> |
103 | 143 | <VisualState x:Name="LastItemType"> |
|
110 | 150 | </VisualState.Setters> |
111 | 151 | </VisualState>--> |
112 | 152 | </VisualStateGroup> |
| 153 | + |
113 | 154 | </VisualStateManager.VisualStateGroups> |
114 | 155 | </Grid> |
115 | 156 | </ControlTemplate> |
|
0 commit comments