Add assertion proving NeedsLayout is always false before call OnSubViewsLaidOut

This commit is contained in:
BDisp
2025-07-28 13:19:27 +01:00
parent 08dfea67cf
commit 03120b93fb

View File

@@ -703,7 +703,7 @@ public partial class View // Layout APIs
/// Override to perform tasks after the <see cref="View"/> has been resized or the layout has
/// otherwise changed.
/// </remarks>
protected virtual void OnSubViewsLaidOut (LayoutEventArgs args) { }
protected virtual void OnSubViewsLaidOut (LayoutEventArgs args) { Debug.Assert (!NeedsLayout); }
/// <summary>Raised after all sub-views have been laid out.</summary>
/// <remarks>