|
27 | 27 | <Setter Property="Template"> |
28 | 28 | <Setter.Value> |
29 | 29 | <ControlTemplate TargetType="local:BreadcrumbBar"> |
30 | | - <Grid MinWidth="{TemplateBinding MinWidth}" ColumnSpacing="2"> |
| 30 | + <Grid |
| 31 | + MinWidth="{TemplateBinding MinWidth}" |
| 32 | + ColumnSpacing="2" |
| 33 | + TabFocusNavigation="Once" |
| 34 | + XYFocusKeyboardNavigation="Enabled"> |
31 | 35 | <Grid.ColumnDefinitions> |
32 | 36 | <ColumnDefinition Width="Auto" /> |
33 | 37 | <ColumnDefinition Width="Auto" /> |
|
38 | 42 | x:Name="PART_RootBreadcrumbBarItem" |
39 | 43 | Grid.Column="0" |
40 | 44 | Padding="{StaticResource BreadcrumbBarRootItemPadding}" |
| 45 | + AutomationProperties.AccessibilityView="Content" |
41 | 46 | CornerRadius="{StaticResource BreadcrumbBarRootItemCornerRadius}"> |
42 | 47 | <ContentPresenter Content="{Binding RootItem, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> |
43 | 48 | </local:BreadcrumbBarItem> |
44 | 49 |
|
45 | 50 | <local:BreadcrumbBarItem |
46 | 51 | x:Name="PART_EllipsisBreadcrumbBarItem" |
47 | 52 | Grid.Column="1" |
| 53 | + AutomationProperties.AccessibilityView="Content" |
48 | 54 | IsEllipsis="True" |
49 | 55 | Visibility="Collapsed"> |
50 | 56 | <FontIcon FontSize="{StaticResource BreadcrumbBarEllipsisFontSize}" Glyph="" /> |
|
81 | 87 | <Setter Property="VerticalAlignment" Value="Stretch" /> |
82 | 88 | <Setter Property="VerticalContentAlignment" Value="Center" /> |
83 | 89 |
|
84 | | - <Setter Property="IsTabStop" Value="True" /> |
| 90 | + <Setter Property="FocusVisualMargin" Value="1" /> |
| 91 | + <Setter Property="IsTabStop" Value="False" /> |
85 | 92 | <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" /> |
86 | 93 | <Setter Property="Template"> |
87 | 94 | <Setter.Value> |
88 | 95 | <ControlTemplate TargetType="local:BreadcrumbBarItem"> |
89 | | - <Grid x:Name="PART_LayoutRoot" ColumnSpacing="2"> |
| 96 | + <Grid |
| 97 | + x:Name="PART_LayoutRoot" |
| 98 | + ColumnSpacing="2" |
| 99 | + XYFocusKeyboardNavigation="Enabled"> |
90 | 100 | <Grid.ColumnDefinitions> |
91 | 101 | <ColumnDefinition x:Name="PART_ContentColumn" Width="Auto" /> |
92 | 102 | <ColumnDefinition x:Name="PART_ChevronColumn" Width="Auto" /> |
93 | 103 | </Grid.ColumnDefinitions> |
94 | 104 |
|
95 | 105 | <!-- Clickable Area --> |
96 | | - <Border |
| 106 | + <Button |
97 | 107 | x:Name="PART_ItemContentButton" |
98 | 108 | Padding="{TemplateBinding Padding}" |
| 109 | + VerticalAlignment="Stretch" |
| 110 | + AutomationProperties.AccessibilityView="Raw" |
99 | 111 | Background="{TemplateBinding Background}" |
100 | 112 | BorderBrush="{TemplateBinding BorderBrush}" |
101 | 113 | BorderThickness="{TemplateBinding BorderThickness}" |
102 | | - CornerRadius="{TemplateBinding CornerRadius}"> |
103 | | - <Border.BackgroundTransition> |
104 | | - <BrushTransition Duration="0:0:0.083" /> |
105 | | - </Border.BackgroundTransition> |
| 114 | + Control.IsTemplateFocusTarget="True" |
| 115 | + CornerRadius="{TemplateBinding CornerRadius}" |
| 116 | + IsTabStop="True" |
| 117 | + UseSystemFocusVisuals="True"> |
106 | 118 | <FlyoutBase.AttachedFlyout> |
107 | 119 | <MenuFlyout |
108 | 120 | x:Name="PART_ItemEllipsisDropDownMenuFlyout" |
|
123 | 135 | x:Name="PART_ItemContentPresenter" |
124 | 136 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
125 | 137 | VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 138 | + AutomationProperties.AccessibilityView="Raw" |
126 | 139 | Content="{TemplateBinding Content}" |
127 | 140 | ContentTemplate="{TemplateBinding ContentTemplate}" |
128 | 141 | ContentTransitions="{TemplateBinding ContentTransitions}" |
|
132 | 145 | Foreground="{ThemeResource BreadcrumbBarForegroundBrush}" |
133 | 146 | TextLineBounds="Tight" /> |
134 | 147 |
|
135 | | - </Border> |
| 148 | + </Button> |
136 | 149 |
|
137 | 150 | <!-- Chevron --> |
138 | | - <Border |
| 151 | + <Button |
139 | 152 | x:Name="PART_ItemChevronButton" |
140 | 153 | Grid.Column="1" |
141 | 154 | Padding="{StaticResource BreadcrumbBarChevronPadding}" |
| 155 | + VerticalAlignment="Stretch" |
| 156 | + AutomationProperties.AccessibilityView="Content" |
142 | 157 | Background="{TemplateBinding Background}" |
143 | 158 | BorderBrush="{TemplateBinding BorderBrush}" |
144 | 159 | BorderThickness="{TemplateBinding BorderThickness}" |
145 | | - CornerRadius="{StaticResource BreadcrumbBarChevronCornerRaduis}"> |
146 | | - <Border.BackgroundTransition> |
147 | | - <BrushTransition Duration="0:0:0.083" /> |
148 | | - </Border.BackgroundTransition> |
| 160 | + CornerRadius="{StaticResource BreadcrumbBarChevronCornerRaduis}" |
| 161 | + IsTabStop="True" |
| 162 | + UseSystemFocusVisuals="True"> |
149 | 163 | <FlyoutBase.AttachedFlyout> |
150 | 164 | <MenuFlyout |
151 | 165 | x:Name="PART_ItemChevronDropDownMenuFlyout" |
|
169 | 183 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
170 | 184 | VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
171 | 185 | AnimatedIcon.State="NormalOff" |
| 186 | + AutomationProperties.AccessibilityView="Raw" |
172 | 187 | Foreground="{ThemeResource BreadcrumbBarForegroundBrush}" |
173 | 188 | MirroredWhenRightToLeft="True" |
174 | 189 | RenderTransformOrigin="0.5, 0.5"> |
|
181 | 196 | <animatedvisuals:AnimatedChevronRightDownSmallVisualSource /> |
182 | 197 | </AnimatedIcon> |
183 | 198 |
|
184 | | - </Border> |
| 199 | + </Button> |
185 | 200 |
|
186 | 201 | <VisualStateManager.VisualStateGroups> |
187 | 202 |
|
188 | | - <VisualStateGroup x:Name="PointerStates"> |
189 | | - <VisualState x:Name="PointerNormal" /> |
190 | | - |
191 | | - <VisualState x:Name="PointerOverItem"> |
192 | | - <VisualState.Setters> |
193 | | - <Setter Target="PART_ItemContentButton.Background" Value="{ThemeResource ControlFillColorSecondaryBrush}" /> |
194 | | - <Setter Target="PART_ItemChevronButton.Background" Value="{ThemeResource ControlFillColorSecondaryBrush}" /> |
195 | | - </VisualState.Setters> |
196 | | - </VisualState> |
197 | | - <VisualState x:Name="PointerOverChevron"> |
198 | | - <VisualState.Setters> |
199 | | - <Setter Target="PART_ItemChevronButton.Background" Value="{ThemeResource ControlFillColorSecondaryBrush}" /> |
200 | | - </VisualState.Setters> |
201 | | - </VisualState> |
202 | | - |
203 | | - <VisualState x:Name="PointerPressedOnItem"> |
204 | | - <VisualState.Setters> |
205 | | - <Setter Target="PART_ItemContentButton.Background" Value="{ThemeResource ControlFillColorTertiaryBrush}" /> |
206 | | - <Setter Target="PART_ItemChevronButton.Background" Value="{ThemeResource ControlFillColorTertiaryBrush}" /> |
207 | | - </VisualState.Setters> |
208 | | - </VisualState> |
209 | | - <VisualState x:Name="PointerPressedOnChevron"> |
210 | | - <VisualState.Setters> |
211 | | - <Setter Target="PART_ItemChevronButton.Background" Value="{ThemeResource ControlFillColorTertiaryBrush}" /> |
212 | | - </VisualState.Setters> |
213 | | - </VisualState> |
214 | | - |
215 | | - </VisualStateGroup> |
216 | | - |
217 | 203 | <VisualStateGroup x:Name="ChevronVisibilityStates"> |
218 | 204 | <VisualState x:Name="ChevronVisible" /> |
219 | 205 | <VisualState x:Name="ChevronCollapsed"> |
|
0 commit comments