Fixes #3182. OnResizeNeeded returns int.MaxValue and int.MaxValue when Application.Top is null, should return Size.Empty.

This commit is contained in:
BDisp
2024-01-16 01:11:48 +00:00
parent b79171a0f5
commit cf9c24b846

View File

@@ -560,7 +560,7 @@ public partial class View {
var relativeBounds = SuperView is { IsInitialized: true } ? SuperView.Bounds :
Application.Top != null && Application.Top.IsInitialized ? Application.Top.Bounds :
Application.Driver?.Bounds ??
new Rect (0, 0, int.MaxValue, int.MaxValue);
Rect.Empty;
SetRelativeLayout (relativeBounds);
// TODO: Determine what, if any of the below is actually needed here.