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

Remove TabItem (not hide) from TabControlExt

Thread ID:





121433 Dec 14,2015 10:40 PM UTC May 5,2016 05:42 AM UTC WPF 5
Tags: TabControlExt
Vladimir Culum
Asked On December 14, 2015 10:40 PM UTC


I am using TabControlExt. Items of TabControl are binded to ObservableCollection. I have SelectedItem binded to TItem in ViewModel.

When user select some item in menu, new item is added to ObsevableCollection and new TabItem is shown.

That is working fine.

In the TabControlExt there is close (x) button. When I click that button, TabItem is removed from TabControl.

Problem is that TabItem is not removed from Collection, it is just hidden.

When user make new selection through menu, all TabItems get show.


1. user open 5 items (TabItem1, TabItem2, TabItem3, TabItem4, TabItem5)
2. user close 2 items (TabItem1 and TabItem3)
3. user make new selection and want to open TabItem6

In that moment, 6 TabItems are shown: TabItem1, TabItem2, TabItem3, TabItem4, TabItem5 and TabItem6

How can I source TabControlExt close button to remove selected item (TItem) from ObservableCollection that is ItemsSource of TabControlExt.

Thank You.

Victory Jessie Selvam D [Syncfusion]
Replied On December 15, 2015 10:29 AM UTC

Hi Vladimir Culum,

Thank you for using Syncfusion products.

The value of CloseMode property in TabControlExt is Hide by default so it does not remove the tab item from collection when closed. We suggest you to set CloseMode.Delete for this property so that the closed tab item will be removed from the ItemCollection. We have prepared a sample and video to demonstrate the same and you can dowload it from the following link:

Knowlege Base link: https://www.syncfusion.com/kb/3605/how-to-update-the-tabitemcollection-when-any-one-of-its-tabitem-gets-closed

Sample: TabControl_Remove_Items

Video: Video


Vladimir Culum
Replied On December 15, 2015 06:42 PM UTC


Thanks for quick reply.

I have different problem. I know CloseMode properties.

I have empty ObservableCollection TItems. When user click on menu item, new item is added in TItems and TabItem is shown.
When I click close button, Item is not removed from ObservableCollection, and next time I add new one, all items that were added is shown.

That is my problem.


Victory Jessie Selvam D [Syncfusion]
Replied On December 16, 2015 12:26 PM UTC

Hi Vladimir Culum,

We have prepared a sample with menu for creating and selecting TabItemExt but still we were unable to reproduce the reported issue with that. Could you please update us your Essential Studio version and modified sample reproducing the issue? You can download the sample from the following link:

Sample: TabControl_Remove_Items


Vladimir Culum
Replied On May 4, 2016 10:13 PM UTC

Sorry. I just realise that I didn`t make update on this issue.

I resolve the problem.

Problem was in my code arch. I make update to ObservableCollection that was bind to TabExt ItemsSource from service, and didn`t make TwoWay update onClose in my ViewModel.

This is working as expected.

Thank You.

Vijayalakshmi Roopkumar [Syncfusion]
Replied On May 5, 2016 05:42 AM UTC

Hi Vladimir,

We are glad to hear that the issue has been resolved at your end. Please get back with us if you need any further assistance.

Vijayalakshmi V.R.


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

or the page will be automatically redirected to 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