-
Notifications
You must be signed in to change notification settings - Fork 1.9k
CollectionView inside invisible StackLayout doesn't show on iOS #28263
Copy link
Copy link
Closed
Labels
t/bugSomething isn't workingSomething isn't working
Description
Description
CollectionView inside invisible StackLayout doesn't show when IsVisible changed to True
Steps to Reproduce
- Create new MAUI
- Add to MainPage.xaml the following:
<StackLayout> <Button Text="Show/Hide" Clicked="Button_Clicked" /> <StackLayout x:Name="StackLayout1" IsVisible="False"> <CollectionView> <CollectionView.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> </CollectionView.ItemsSource> </CollectionView> </StackLayout> <CollectionView x:Name="CollectionView2" IsVisible="False"> <CollectionView.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> </CollectionView.ItemsSource> </CollectionView> </StackLayout> - Add to MainPage.xaml.cs:
private void Button_Clicked(object sender, EventArgs e) { StackLayout1.IsVisible = !StackLayout1.IsVisible; CollectionView2.IsVisible = !CollectionView2.IsVisible; } - Run app on iPhone simulator or device
Link to public reproduction project repository
https://github.com/vpshonyak/BugCollectionView.git
Version with bug
9.0.40 SR4
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
No response
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
t/bugSomething isn't workingSomething isn't working