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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SegmentControl Crashes app when using Shell Flyout with error Cannot access a disposed object

Thread ID:





148878 Nov 6,2019 10:32 PM UTC Nov 8,2019 01:39 PM UTC Xamarin.Forms 1
Tags: SfSegmentedControl
Claiton Lovato
Asked On November 6, 2019 10:33 PM UTC

Hi Guys,

     I think I got a problem with the SegmentControl, when using the control on a App with the standard Shell Flyout menus, going to a different view and then returning to a view with the SegmentControl, the app crashes with the error "Cannot access a disposed object. Object name: 'SfSegmentedControl'."
The same problem does not happen if instead of using the Flyout menu I use the TabBar.

To replicate the problem:
1. Create a new Xamarin Shell App (I am using Visual Studio for Mac 2019);
2. Add the nuget package Xamarin.Forms.Buttons;
3. Add License and SfSegmentControl Initialization;
4. On the ItemsPage.xaml, insert a SfSegmentControl inside the first StackLayout with some Collection Items;
5. Run the app (with Shell still using TabBar) - App runs, and switching between Browse, About and back to Browse, the Segment control is still operational;
6. On the AppShell.xaml, comment out the TabBar, and add 2 FloyoutItems to the same views;
7. Run the app again - This time, switching between Browse to About and back to Browse, the Segment control is not formatted correctly and trying to tap on a Segment crashes the App.

I am attaching a zip with the App created as mentioned above.

Thank you in advance.

Attachment: SfSegmentTester_2389f7fc.zip

Hemalatha Marikumar [Syncfusion]
Replied On November 8, 2019 01:39 PM UTC

Hi Claiton, 
Greetings from Syncfusion. 
The reported issue has been reproduced on our side. We are currently validating the issue to find the exact root cause. Please check with the incident under your account for further updates. 
Hemalatha M. 


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

Live Chat Icon For mobile
Live Chat Icon