|
5 | 5 | xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" |
6 | 6 | xmlns:local="using:Files.App.Controls"> |
7 | 7 |
|
8 | | - <x:Double x:Key="BreadcrumbBarHeight">32</x:Double> |
| 8 | + <x:Double x:Key="BreadcrumbBarHeight">34</x:Double> |
9 | 9 | <x:Double x:Key="BreadcrumbBarMinWidth">120</x:Double> |
10 | 10 | <x:Double x:Key="BreadcrumbBarEllipsisFontSize">16</x:Double> |
11 | 11 |
|
12 | 12 | <Thickness x:Key="BreadcrumbBarChevronPadding">4,0</Thickness> |
13 | 13 | <Thickness x:Key="BreadcrumbBarItemPadding">8,0</Thickness> |
14 | 14 | <Thickness x:Key="BreadcrumbBarRootItemPadding">16,0,8,0</Thickness> |
| 15 | + <Thickness x:Key="BreadcrumbBarItemMargin">2,0,0,0</Thickness> |
15 | 16 |
|
16 | 17 | <CornerRadius x:Key="BreadcrumbBarItemCornerRadius">2,2,2,2</CornerRadius> |
17 | 18 | <CornerRadius x:Key="BreadcrumbBarChevronCornerRaduis">2,2,2,2</CornerRadius> |
|
21 | 22 | <Style BasedOn="{StaticResource DefaultBreadcrumbBarItemStyle}" TargetType="local:BreadcrumbBarItem" /> |
22 | 23 |
|
23 | 24 | <Style x:Key="DefaultBreadcrumbBarStyle" TargetType="local:BreadcrumbBar"> |
| 25 | + |
24 | 26 | <Setter Property="MinWidth" Value="{StaticResource BreadcrumbBarMinWidth}" /> |
| 27 | + |
| 28 | + <Setter Property="HorizontalAlignment" Value="Stretch" /> |
| 29 | + <Setter Property="HorizontalContentAlignment" Value="Center" /> |
| 30 | + <Setter Property="VerticalAlignment" Value="Stretch" /> |
| 31 | + <Setter Property="VerticalContentAlignment" Value="Center" /> |
| 32 | + |
25 | 33 | <Setter Property="AutomationProperties.LandmarkType" Value="Navigation" /> |
| 34 | + |
26 | 35 | <Setter Property="IsTabStop" Value="False" /> |
| 36 | + |
27 | 37 | <Setter Property="Template"> |
28 | 38 | <Setter.Value> |
29 | 39 | <ControlTemplate TargetType="local:BreadcrumbBar"> |
30 | 40 | <Grid |
31 | 41 | MinWidth="{TemplateBinding MinWidth}" |
32 | | - ColumnSpacing="2" |
| 42 | + HorizontalAlignment="{TemplateBinding HorizontalAlignment}" |
| 43 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 44 | + Background="{TemplateBinding Background}" |
33 | 45 | TabFocusNavigation="Once" |
34 | 46 | XYFocusKeyboardNavigation="Enabled"> |
35 | 47 | <Grid.ColumnDefinitions> |
36 | 48 | <ColumnDefinition Width="Auto" /> |
37 | 49 | <ColumnDefinition Width="Auto" /> |
38 | 50 | <ColumnDefinition Width="*" /> |
| 51 | + <ColumnDefinition Width="Auto" /> |
39 | 52 | </Grid.ColumnDefinitions> |
40 | 53 |
|
41 | 54 | <local:BreadcrumbBarItem |
|
50 | 63 | <local:BreadcrumbBarItem |
51 | 64 | x:Name="PART_EllipsisBreadcrumbBarItem" |
52 | 65 | Grid.Column="1" |
| 66 | + Margin="{StaticResource BreadcrumbBarItemMargin}" |
53 | 67 | AutomationProperties.AccessibilityView="Content" |
54 | 68 | IsEllipsis="True" |
55 | 69 | Visibility="Collapsed"> |
|
59 | 73 | <ItemsRepeater |
60 | 74 | x:Name="PART_MainItemsRepeater" |
61 | 75 | Grid.Column="2" |
| 76 | + Margin="{StaticResource BreadcrumbBarItemMargin}" |
| 77 | + HorizontalAlignment="Left" |
62 | 78 | ItemTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" |
63 | 79 | ItemsSource="{Binding ItemsSource, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> |
64 | 80 |
|
| 81 | + <Border Grid.Column="3" Canvas.ZIndex="-10"> |
| 82 | + <FontIcon |
| 83 | + Margin="12,0,12,0" |
| 84 | + FontSize="14" |
| 85 | + Glyph="" /> |
| 86 | + </Border> |
| 87 | + |
65 | 88 | </Grid> |
66 | 89 | </ControlTemplate> |
67 | 90 | </Setter.Value> |
|
85 | 108 | <Setter Property="HorizontalAlignment" Value="Stretch" /> |
86 | 109 | <Setter Property="HorizontalContentAlignment" Value="Center" /> |
87 | 110 | <Setter Property="VerticalAlignment" Value="Stretch" /> |
88 | | - <Setter Property="VerticalContentAlignment" Value="Center" /> |
| 111 | + <Setter Property="VerticalContentAlignment" Value="Stretch" /> |
89 | 112 |
|
90 | 113 | <Setter Property="FocusVisualMargin" Value="1" /> |
91 | 114 | <Setter Property="IsTabStop" Value="False" /> |
|
95 | 118 | <ControlTemplate TargetType="local:BreadcrumbBarItem"> |
96 | 119 | <Grid |
97 | 120 | x:Name="PART_LayoutRoot" |
98 | | - ColumnSpacing="2" |
99 | 121 | TabFocusNavigation="Once" |
100 | 122 | XYFocusKeyboardNavigation="Enabled"> |
101 | 123 | <Grid.ColumnDefinitions> |
|
107 | 129 | <Button |
108 | 130 | x:Name="PART_ItemContentButton" |
109 | 131 | Padding="{TemplateBinding Padding}" |
110 | | - VerticalAlignment="Stretch" |
| 132 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
111 | 133 | AutomationProperties.AccessibilityView="Raw" |
112 | 134 | Background="{TemplateBinding Background}" |
113 | 135 | BorderBrush="{TemplateBinding BorderBrush}" |
114 | 136 | BorderThickness="{TemplateBinding BorderThickness}" |
115 | 137 | Control.IsTemplateFocusTarget="True" |
116 | 138 | CornerRadius="{TemplateBinding CornerRadius}" |
117 | 139 | UseSystemFocusVisuals="True"> |
| 140 | + <Button.Resources> |
| 141 | + <ResourceDictionary> |
| 142 | + <StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="SubtleFillColorTertiaryBrush" /> |
| 143 | + <StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="SubtleFillColorSecondaryBrush" /> |
| 144 | + </ResourceDictionary> |
| 145 | + </Button.Resources> |
118 | 146 | <FlyoutBase.AttachedFlyout> |
119 | 147 | <MenuFlyout |
120 | 148 | x:Name="PART_ItemEllipsisDropDownMenuFlyout" |
|
151 | 179 | <Button |
152 | 180 | x:Name="PART_ItemChevronButton" |
153 | 181 | Grid.Column="1" |
| 182 | + Margin="{StaticResource BreadcrumbBarItemMargin}" |
154 | 183 | Padding="{StaticResource BreadcrumbBarChevronPadding}" |
155 | | - VerticalAlignment="Stretch" |
| 184 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
156 | 185 | AutomationProperties.AccessibilityView="Content" |
157 | 186 | Background="{TemplateBinding Background}" |
158 | 187 | BorderBrush="{TemplateBinding BorderBrush}" |
|
0 commit comments