-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Closed
Copy link
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewcollectionview-cv2partner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/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
On iOS, have a FlyoutPage.
On its flyout, I have a CollectionView. The first collection item isn't rendered correctly, with part of its contents getting pushed over the second item.
I haven't tried this on an iPad or iPhones without a notch, so I do not know if it affects all iOS devices or just some of them.
I've reproduced this on an iPhone 11.
Steps to Reproduce
- Create a new blank maui project.
- Change the
CreateWindowmethod in App.xaml.cs to statereturn new Window(new MainPage());, thus removing Shell as that is incompatible with FlyoutPage. - Change
MainPage.xamlto be a FlyoutPage, and add the contents of the xaml shown below. - Change
MainPage.xaml.csto extendFlyoutPageinstead ofContentPage. delete any other unnecessary code. - Run the app
- Swipe from the left edge to open the flyout menu
- OBSERVE
- the first item in the menu's collectionview will render its label content over the second item.
- using additional containers around the labels' stacklayout will still show the broken layout, just with a different presentation (see screenshots below).
VerticalStackLayout wrapped in a Border:

VerticalStackLayout wrapped in a Frame:

required xaml:
<FlyoutPage.Flyout>
<ContentPage Title="Menu">
<ContentPage.Resources>
<ResourceDictionary>
<x:Array x:Key="Items" Type="{x:Type x:String}">
<x:String>Item 1</x:String>
<x:String>Item 2</x:String>
<x:String>Item 3</x:String>
<x:String>Item 4</x:String>
</x:Array>
</ResourceDictionary>
</ContentPage.Resources>
<CollectionView ItemSizingStrategy="MeasureAllItems" ItemsSource="{StaticResource Items}">
<CollectionView.ItemTemplate>
<DataTemplate>
<VerticalStackLayout>
<Label
FontSize="32"
LineBreakMode="TailTruncation"
Text="{Binding}" />
<Label
FontSize="16"
LineBreakMode="TailTruncation"
Opacity="0.66"
Text="subheader" />
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentPage>
</FlyoutPage.Flyout>
<FlyoutPage.Detail>
<ContentPage>
<ScrollView>
<VerticalStackLayout Padding="30,0" Spacing="25">
<Label
SemanticProperties.HeadingLevel="Level1"
Style="{StaticResource Headline}"
Text="swipe from the left to open the flyout" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>
</FlyoutPage.Detail>
Link to public reproduction project repository
No response
Version with bug
9.0.60 SR6
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?
The only workaround I've found so far is to add a blank item at the top of the CollectionView, which will allow for the "real" top item to be rendered properly when it is in fact the second item.
Relevant log output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewcollectionview-cv2partner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/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
