Skip to content

Grid RowDefinition.MinHeight is ignored #4727

Closed

Description

@MartinZikmund

Current behavior

When MinHeight is set on a RowDefinition, it is ignored.

Expected behavior

Should be considered to properly measure the grid row.

How to reproduce it (as minimally and precisely as possible)

<Grid Background="Red" VerticalAlignment="Center">
  <Grid.RowDefinitions>
    <RowDefinition x:Name="RowDef" MinHeight="20" />
  </Grid.RowDefinitions>
</Grid>

Notice on UWP you see a red horizontal bar, while in Uno there is none.

Note: on UWP, the MinHeight and MaxHeight value changes cause relayout, so if code sets the MinHeight at runtime, and the ActualHeight does not fall into the range [MinHeight,MaxHeight], a recalc of the Grid should be triggered.

Workaround

Environment

Nuget Package:

  • Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
  • Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
  • Uno.SourceGenerationTasks
  • Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
  • Other:

Nuget Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

Activity

  1. added
    kind/bug
    triage/untriaged
    platform/all
    project/layout 🧱
    and removed
    triage/untriaged
    on Dec 12, 2020
  2. MartinZikmund commented on Dec 12, 2020

    @MartinZikmund
    MemberAuthor

    This is used by WinUI NavigationView

  3. added
    area/navigationview 🧭
    on Dec 14, 2020
  4. added
    difficulty/tbd
    on Feb 15, 2021
  5. added this to the 3.7 milestone on Apr 23, 2021
  6. self-assigned this
    on Apr 23, 2021
  7. MartinZikmund commented on Apr 27, 2021

    @MartinZikmund
    MemberAuthor

    @carldebilly 🚀🚀🚀🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/navigationview 🧭difficulty/tbdkind/bugplatform/allproject/layout 🧱

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions