I'm seeing something odd: Adding a TabItemEx object to a XamTabControl and populating the TabItemEx with whatever else works and it's displayed. The tab is appended to the XamTabControl.Items collection. This is what I'd expect.
However, closing a tab does not remove it from the XamTabControl.Items collection. Add 3, close 3 and the Items.count is 3 still...I'm closing it- not hiding it or collapsing its so the tab should be properly removed from the collection.
Please advise. We are using 15.1 Ultimate.
With all due respect, closing a tab should remove it from the collection and not just change the visibility property. This behavior is not correct.
Hello,
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
Thank you for your post.
I have been looking into your post and it seems that the behavior you have described is expected. When you close a tab, XamTabControl does not remove it from the Items collection automatically, it hides the Tab instead of delete it. If you want to remove the Tab from Items collection you can handle Closed event of TabItemEx and delete the Tab programmatically in the event handler. I created short sample that illustrate this approach in order to show you how you can achieve the functionality that you are looking for.
Also you can take a look at the following link from our online documentation:
http://help.infragistics.com/Help/Doc/WPF/2015.1/CLR4.0/html/xamTabControl_Removing_a_Closed_Tab.html
where you can see code snippet and read more details from the topic about removing a Closed Tab from Items collection.
Please let me know if you require any further assistance on the matter.