Skip to content

Commit 5c8c89e

Browse files
Merge pull request #157 from syncfusion/LoadCommand_HangIos
949491 & 938705- 'LoadCommand' property not found warning thrown when using Refresh Command & [iOS] App hangs when using TreeView inside PullToRefresh in .NET 9
2 parents 35b9bc6 + c195e6a commit 5c8c89e

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

maui/src/Core/BaseView/DrawableLayoutView/SfView.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public abstract class SfView : View, IDrawableLayout, IVisualTreeElement, ISeman
2525

2626
private bool clipToBounds = true;
2727

28+
/// <summary>
29+
/// The field indicates whether it is layout based control.
30+
/// </summary>
31+
private bool isLayoutControl = false;
32+
2833
private Thickness padding = new(0);
2934

3035
readonly List<IView> children = [];
@@ -64,6 +69,21 @@ internal bool IgnoreSafeArea
6469
}
6570
}
6671

72+
/// <summary>
73+
/// Gets or sets a value indicating whether it is layout based control.
74+
/// </summary>
75+
internal bool IsLayoutControl
76+
{
77+
get
78+
{
79+
return this.isLayoutControl;
80+
}
81+
set
82+
{
83+
this.isLayoutControl = value;
84+
}
85+
}
86+
6787
/// <summary>
6888
/// Gets the collection of child views contained within this view.
6989
/// </summary>

maui/src/Core/BaseView/PlatformView/LayoutViewExt.ios.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public override void LayoutSubviews()
203203
var widthConstraint = bounds.Width;
204204
var heightConstraint = bounds.Height;
205205

206-
if (!IsMeasureValid(widthConstraint, heightConstraint) && Superview is not Microsoft.Maui.Platform.MauiView)
206+
if (!IsMeasureValid(widthConstraint, heightConstraint) && Superview is not Microsoft.Maui.Platform.MauiView && View is SfView sfView && !sfView.IsLayoutControl)
207207
{
208208
layout.CrossPlatformMeasure(bounds.Width, bounds.Height);
209209
CacheMeasureConstraints(widthConstraint, heightConstraint);

maui/src/PullToRefresh/SfPullToRefresh.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public partial class SfPullToRefresh : PullToRefreshBase, ITouchListener, IParen
112112
typeof(ICommand),
113113
typeof(SfPullToRefresh),
114114
null,
115-
BindingMode.TwoWay,
115+
BindingMode.Default,
116116
null);
117117

118118
/// <summary>
@@ -127,7 +127,7 @@ public partial class SfPullToRefresh : PullToRefreshBase, ITouchListener, IParen
127127
typeof(object),
128128
typeof(SfPullToRefresh),
129129
null,
130-
BindingMode.TwoWay,
130+
BindingMode.Default,
131131
null);
132132

133133
/// <summary>
@@ -360,6 +360,7 @@ public SfPullToRefresh()
360360
Children.Add(_progressCircleView);
361361
ClipToBounds = true;
362362
ThemeElement.InitializeThemeResources(this, "SfPullToRefreshTheme");
363+
this.IsLayoutControl = true;
363364
}
364365

365366
#endregion

0 commit comments

Comments
 (0)