-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
area-controls-listviewListView and TableViewListView and TableViewplatform/androidplatform/ioss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
If ListView initially invisible, then attempt to make it visible fails
Steps to Reproduce
- Create new .NET MAUI app;
- Add XAML to your MainPage.xaml:
<StackLayout>
<Button Text="Show/Hide ListView" Clicked="Button_Clicked" />
<ListView x:Name="ListView1" IsVisible="False">
<ListView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Item 1</x:String>
<x:String>Item 2</x:String>
<x:String>Item 3</x:String>
</x:Array>
</ListView.ItemsSource>
</ListView>
</StackLayout>
- Add code:
private void Button_Clicked(object sender, EventArgs e)
{
ListView1.IsVisible = !ListView1.IsVisible;
}
- Run your app;
- Tap the 'Show/Hide ListView' button several times;
Expected behavior: ListView should shows up after the first tap;
Actual behavior: on Android ListView shows up only after 3rd tap; on iPhone ListView never shows up.
Link to public reproduction project repository
https://github.com/vpshonyak/BugListView.git
Version with bug
9.0.30 SR3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
No response
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
On Android works if 'ListView1.IsVisible = !ListView1.IsVisible;' replaced with:
ListView1.IsVisible = !ListView1.IsVisible;
ListView1.IsVisible = !ListView1.IsVisible;
ListView1.IsVisible = !ListView1.IsVisible;
Relevant log output
Metadata
Metadata
Assignees
Labels
area-controls-listviewListView and TableViewListView and TableViewplatform/androidplatform/ioss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working