dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.06k stars 1.73k forks source link

[Bug] Layout not sizing and spacing properly with multiline labels #1406

Closed davidortinau closed 3 years ago

davidortinau commented 3 years ago

Description

I have a ContentPage > ScrollView > StackLayout (container) > Grid > StackLayout > Label with multiple lines, followed by other children of the container StackLayout. The next child after the Grid does NOT space properly, likely because of the multi-line labels.

<Label Text="Examples"
                       StyleClass="LargeTitle" />
                <BoxView StyleClass="HRule"/>
                <Grid ColumnDefinitions="*,*">
                     <StackLayout Grid.Column="0">
                            <Label Text="Overview" StyleClass="Title1"/>
                            <Label Text=".NET Multi-platform App UI (. NET MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML. Using . NET MAUI, you can develop apps that can run on Android, iOS, macOS, and Windows from a single shared code-base." 
                                   LineBreakMode="WordWrap"
                            />
                     </StackLayout>
                     <StackLayout Grid.Column="1">
                            <Label Text="Getting Started" StyleClass="Title1"/>
                            <Label Text="To create .NET Multi-platform App UI (MAUI) apps, you currently require .NET 6 Preview 5 with .NET MAUI and the platform SDKs for Android, iOS, macOS, tvOS, and Mac Catalyst." 
                                   LineBreakMode="WordWrap"
                            />
                     </StackLayout>
                </Grid>

                <Label Text="Text Color Styles"
                       Margin="0,15,0,0"
                       StyleClass="Headline" />
                <BoxView StyleClass="HRule"/>

See that "Text Color Styles" label is overlapping with the "To create..." label above it.

Screen Shot 2021-06-21 at 11 00 23 PM

Expected Behavior

I should be able to see all of the multi-line label and the grid should size to be the height of the longest bit of content, then after 15 margin I should see the label "Text Color Styles".

Actual Behavior

Overlapping

Basic Information

hartez commented 3 years ago

Fixed as of Preview 7.