Skip to content

MAUI WinUI Grids don't render properly in flyout menu #19542

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


Our .Net MAUI app uses custom DataTemplates for ShellContent in a FlyoutItem. When the DataTemplate contains a Grid, it does not render properly on Windows. It does render properly on Android and iOS.

I've attached a modified version of the .Net MAUI Shell sample app that reproduces the problem.

This is the expected result (as shown on Android):

flyout on Andriod.png

And this is what we get on Windows:

flyout on Windows.png

You can see the Grid does not take up the full width available.

This is the DataTemplate:

    <Shell.ItemTemplate>
        <DataTemplate>
            <Grid ColumnDefinitions="Auto,*,Auto"
                  Padding="5"
                  BackgroundColor="LightGreen">
                <Image Grid.Column="0"
                       Source="{Binding Icon}"
                       HeightRequest="30"
                       BackgroundColor="Salmon"/>
                <Label Grid.Column="1"
                       Text="{Binding Title}"
                       FontAttributes="Italic"
                       VerticalTextAlignment="Center"
                       HorizontalTextAlignment="Center"
                       BackgroundColor="Cyan"/>
                <Image Grid.Column="2"
                       Source="{Binding Icon}"
                       HeightRequest="30"
                       BackgroundColor="Teal"/>
            </Grid>
        </DataTemplate>
    </Shell.ItemTemplate>

Original Comments

Feedback Bot on 12/17/2023, 05:53 PM:

(private comment, text removed)


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellShell Navigation, Routes, Tabs, Flyoutpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions