We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Removing a tab from an SfTabView throws exception in iOS

Thread ID:

Created:

Updated:

Platform:

Replies:

141821 Jan 6,2019 09:56 PM UTC Jan 24,2019 12:56 PM UTC Xamarin.Forms 3
loading
Tags: SfTabView
Chris
Asked On January 6, 2019 09:56 PM UTC

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)

  • Dhanasekar R [Syncfusion]
    Replied On 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 
     


    Chris
    Replied On January 23, 2019 03:53 PM UTC

    This issue is still not fixed in the latest NuGet package that was rolled out.

    Dhanasekar R [Syncfusion]
    Replied On 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  


    CONFIRMATION

    This post will be permanently deleted. Are you sure you want to continue?

    Sorry, An error occured while processing your request. Please try again later.

    Please sign in to access our forum

    This page will automatically be redirected to the sign-in page in 10 seconds.

    Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

    ;