Hello,
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.
example:
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.