Skip to content

Commit

Permalink
Fixing Bug 1159083 in WPF Sample
Browse files Browse the repository at this point in the history
Description
While navigating through caps lock+arrow key, All the drop down list
items are announced despite of them being not displayed.
  • Loading branch information
ayushverma-ms committed May 24, 2021
1 parent 9acbae0 commit ea97e3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sample Applications/CustomComboBox/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
ItemsSource="{Binding Movies}" Command="{Binding OnWatchNow}"
ItemContainerStyle="{StaticResource MovieItemContainerStyle}"
DisplayMemberPath="Title"
IsTabStop="False"/>
IsTabStop="False" Width="160"/>

<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="{Binding SelectedMovie, Converter={StaticResource stringConverter}, ConverterParameter=text, NotifyOnTargetUpdated=True}" Style="{DynamicResource streamingTextStyle}" TargetUpdated="TextBlock_TargetUpdated" AutomationProperties.LiveSetting="Assertive"/>
Expand Down
8 changes: 7 additions & 1 deletion Sample Applications/CustomComboBox/Styles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
ItemContainerStyle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ItemContainerStyle}"
DisplayMemberPath="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisplayMemberPath}"
SelectedValuePath="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisplayMemberPath}"
TabIndex="1">
TabIndex="1" Visibility="Collapsed">
<ListBox.Resources>
<Style TargetType="ScrollBar" BasedOn="{StaticResource ScrollBarStyle}" />
<Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}" />
Expand All @@ -350,6 +350,9 @@
<EventTrigger RoutedEvent="local:ExpandableToggleButton.Expanded">
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="lstBx" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="{x:Static Visibility.Visible}"/>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation Storyboard.TargetName="lstBx" Storyboard.TargetProperty="Height" From="0" To="60" Duration="0:0:0.5"/>
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="lstBx" Storyboard.TargetProperty="Focusable">
<DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True"/>
Expand All @@ -360,6 +363,9 @@
<EventTrigger RoutedEvent="local:ExpandableToggleButton.Collapsed">
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="lstBx" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Collapsed}"/>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation Storyboard.TargetName="lstBx" Storyboard.TargetProperty="Height" From="60" To="0" Duration="0:0:0.5"/>
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="lstBx" Storyboard.TargetProperty="Focusable">
<DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False"/>
Expand Down

0 comments on commit ea97e3a

Please sign in to comment.