- Home
- Forum
- Xamarin.Forms
- Removing a tab from an SfTabView throws exception in iOS
Removing a tab from an SfTabView throws exception in iOS
I am using sfTabView in a Xamarin Forms application and I have noted that removing a tab from the items collection when using versions 16.4.0.42 or 16.4.0.44 throws an exception on iOS, but works fine on version 16.3.0.36.
This is simple to re-create. The code snippet below will throw an exception on iOS with versions 16.4.0.42 or 16.4.0.44 but will work on 16.3.0.36 - the code snippet below will work on Android using all three versions listed in this post.
@this._tabView.Items.Remove(@this._tabView.Items.Last());
The exception that is thrown is an argument out of range exception. I have excluded the sfTabView specific portion of the stack trace below.
Collection`1[T].set_Item (System.Int32 index, T value)
SfTabView.Item_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e)
(wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
BindableObject.OnPropertyChanged (System.String propertyName)
Element.OnPropertyChanged (System.String propertyName)
Element.set_Parent (Xamarin.Forms.Element value)
SfTabView.Items_CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
(wrapper delegate-invoke) <Module>.invoke_void_object_NotifyCollectionChangedEventArgs(object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)
ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index)
ObservableCollection`1[T].RemoveItem (System.Int32 index)
Collection`1[T].Remove (T item)
SIGN IN To post a reply.
3 Replies
DR
Dhanasekar R
Syncfusion Team
January 7, 2019 12:09 PM UTC
Hi Chris,
Greetings from Syncfusion.
We have validated the reported issue "Argument out of range exception occurs when removing the tab item dynamically from the SfTabview in iOS" and we confirm this as a bug and logged a defect report. This fix will be included in our upcoming weekly NuGet release which will be rolled out on 16th January 2019.
Regards,
Dhanasekar
CH
Chris
January 23, 2019 03:53 PM UTC
This issue is still not fixed in the latest NuGet package that was rolled out.
DR
Dhanasekar R
Syncfusion Team
January 24, 2019 12:56 PM UTC
Hi Chris,
Due to stability concerns, we are unable to include complete fix in our weekly NuGet (16.4.0.48). We have planned to include the fix in our 2018 Volume 4 SP1 release which is scheduled by first week of February 2019.
We appreciate your patience until then.
Regards,
Dhanasekar
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
CH Chris
- Jan 6, 2019 09:56 PM UTC
- Jan 24, 2019 12:56 PM UTC