From 1a3bea9ce2d6db7940214d705c64a38c9727acb7 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 20 Sep 2024 19:59:50 +0300 Subject: [PATCH] chore: Restore ILayoutOptOut --- src/Uno.UI/UI/LayoutHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Uno.UI/UI/LayoutHelper.cs b/src/Uno.UI/UI/LayoutHelper.cs index 86fcbe248af1..aba85307f519 100644 --- a/src/Uno.UI/UI/LayoutHelper.cs +++ b/src/Uno.UI/UI/LayoutHelper.cs @@ -43,7 +43,7 @@ internal static (Size min, Size max) GetMinMax(this IFrameworkElement e) var isDefaultWidth = double.IsNaN(e.Width); maxHeight = e.MaxHeight; - minHeight = e.MinHeight; + minHeight = e is ILayoutOptOut { ShouldUseMinSize: false } ? 0 : e.MinHeight; var userValue = e.Height; var height = isDefaultHeight ? double.PositiveInfinity : userValue; @@ -53,7 +53,7 @@ internal static (Size min, Size max) GetMinMax(this IFrameworkElement e) minHeight = Math.Max(Math.Min(maxHeight, height), minHeight); maxWidth = e.MaxWidth; - minWidth = e.MinWidth; + minWidth = e is ILayoutOptOut { ShouldUseMinSize: false } ? 0 : e.MinWidth; userValue = e.Width; var width = (isDefaultWidth ? double.PositiveInfinity : userValue);