When you place badge inside list view, like so
where template is like this, where color bind to a property
then if you make a record visible, then scroll to it will be hidden. and programmatically (i.e. from pull to refresh) refresh the view (i.e.
this.model.Orders[this.model.Orders.Count - 1].OrderStatusColor = Colors.Black;
this.ordersListView.RefreshListViewItem(-1, this.model.Orders.Count - 1, true);
)
you get above exception
at Foundation.NSObject.get_SuperHandle () [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/src/Xamarin.iOS/Foundation/NSObject2.cs:449
at UIKit.UIView.get_Layer () [0x00025] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/src/Xamarin.iOS/UIView.g.cs:4105
at Syncfusion.XForms.iOS.BadgeView.BadgeRenderer.ResetLayer () [0x00000] in <87ce8985515944cbb57a02ad17819328>:0
at Syncfusion.XForms.iOS.BadgeView.BadgeRenderer.InvalidateRenderer () [0x00000] in <87ce8985515944cbb57a02ad17819328>:0
at Syncfusion.XForms.iOS.BadgeView.BadgeSetting.set_BackgroundColor (UIKit.UIColor value) [0x0001f] in <87ce8985515944cbb57a02ad17819328>:0
at Syncfusion.XForms.iOS.BadgeView.BadgeViewUtility.OnBadgeSettingsPropertyChanged (Syncfusion.XForms.iOS.BadgeView.BadgeSetting nativeSettings, Syncfusion.XForms.BadgeView.BadgeSetting formsSettings, System.String propertyName) [0x001df] in <87ce8985515944cbb57a02ad17819328>:0
at Syncfusion.XForms.iOS.BadgeView.BadgeSetting.FormsSettings_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0000d] in <87ce8985515944cbb57a02ad17819328>:0
BTW, I can't help notice that your BadgeSettings class have an empty IDisposable implementation. Considering it contains other disposable objects it should be changed to dispose/clear references as well
public void Dispose()
{
Dispose(disposing: true);
}
protected virtual void Dispose(bool disposing)
{
}