Skip to content

Commit

Permalink
Added tab navigation control in calendar (#9367)
Browse files Browse the repository at this point in the history
* Added tab navigation control in calendar

* Disabled tab navigation for month and year views
  • Loading branch information
siagupta0202 authored Jul 9, 2024
1 parent 70df0fb commit 1c3dc2d
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type CalendarItem}">
<Grid x:Name="PART_Root" Margin="12">
<Grid>
<Grid KeyboardNavigation.TabNavigation="Cycle">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
Expand All @@ -333,13 +333,14 @@
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="Transparent"
Focusable="False"
Focusable="True"
FontSize="14"
FontWeight="Bold"
KeyboardNavigation.TabNavigation="Cycle"
Foreground="{DynamicResource CalendarViewForeground}" />
<Button
x:Name="PART_PreviousButton"
Grid.Column="1"
Grid.Column="1"
Width="26"
Height="26"
Margin="0,0,8,0"
Expand All @@ -348,8 +349,9 @@
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="Transparent"
Focusable="False"
Focusable="True"
AutomationProperties.Name="Previous"
KeyboardNavigation.TabNavigation="Cycle"
Foreground="{DynamicResource CalendarViewButtonForeground}">
<Button.Content>
<TextBlock
Expand All @@ -369,8 +371,9 @@
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="Transparent"
Focusable="False"
Focusable="True"
AutomationProperties.Name="Next"
KeyboardNavigation.TabNavigation="Contained"
Foreground="{DynamicResource CalendarViewButtonForeground}">
<Button.Content>
<TextBlock
Expand All @@ -387,6 +390,7 @@
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
KeyboardNavigation.TabNavigation="None"
Visibility="Visible">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
Expand All @@ -412,7 +416,7 @@
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid x:Name="PART_YearView" Visibility="Hidden">
<Grid x:Name="PART_YearView" Visibility="Hidden" KeyboardNavigation.TabNavigation="None">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
Expand Down

0 comments on commit 1c3dc2d

Please sign in to comment.