File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,15 @@ public static class FrameworkElement
233
233
/// will not, which is how WinUI behaves. Set to true if you have code written for earlier versions of Uno that relies upon the old behavior.
234
234
/// </summary>
235
235
public static bool UseLegacyHitTest { get ; set ; }
236
+
237
+ #if __IOS__
238
+ /// <summary>
239
+ /// When true, propagate the NeedsLayout on superview even if element is in its LayoutSubViews() (i.e. Arrange()).
240
+ /// This is known to cause layout cycle when a child invalidates itself during arrange (e.g. ItemsRepeater).
241
+ /// Default value is false, set it to true will restore behavior of uno v4.7 and earlier.
242
+ /// </summary>
243
+ public static bool IOsAllowSuperviewNeedsLayoutWhileInLayoutSubViews { get ; set ; }
244
+ #endif
236
245
}
237
246
238
247
public static class FrameworkTemplate
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public override void SetNeedsLayout()
36
36
37
37
SetLayoutFlags ( LayoutFlag . MeasureDirty | LayoutFlag . ArrangeDirty ) ;
38
38
39
- if ( ! _inLayoutSubviews )
39
+ if ( FeatureConfiguration . FrameworkElement . IOsAllowSuperviewNeedsLayoutWhileInLayoutSubViews || ! _inLayoutSubviews )
40
40
{
41
41
SetSuperviewNeedsLayout ( ) ;
42
42
}
You can’t perform that action at this time.
0 commit comments