-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
t/bugSomething isn't workingSomething isn't working
Description
Description
When placing a Picker inside a ListView header and modifying its style within the OnFocus method, the picker requires multiple user interactions (clicks/taps) to open.
Expected Behavior:
The picker should open on the first click/tap.
Actual Behavior:
The picker only opens after multiple clicks/taps.
Additional Information:
This issue is reproducible only when the Picker is inside a ListView header. The problem does not occur when using a CollectionView header.
<ListView>
<ListView.Header>
<Picker Focused="VisualElement_OnFocused"
Style="{StaticResource PickerUnSelectedStyle}"
Unfocused="Picker_OnUnfocused"
x:Name="Picker"
Title="Select a monkey">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Baboon</x:String>
<x:String>Capuchin Monkey</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
</ListView.Header>
</ListView>
private void VisualElement_OnFocused(object sender, FocusEventArgs e)
{
Picker.Style = Application.Current?.Resources["PickerSelectedStyle"] as Style;
}
private void Picker_OnUnfocused(object sender, FocusEventArgs e)
{
Picker.Style = Application.Current?.Resources["PickerUnSelectedStyle"] as Style;
}
Steps to Reproduce
- Run the attached sample
SampleButtonCommandIssue.zip - Click on the picker
Link to public reproduction project repository
No response
Version with bug
9.0.110 SR12
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
Use a CollectionView instead of ListView
Relevant log output
Metadata
Metadata
Assignees
Labels
t/bugSomething isn't workingSomething isn't working
