I am using XamTabControl as a region in a Prism (WPF composite client) application. The desired behavior is that whenever I add a new view to the region - which translates to adding new tab to xamtabcontrol, the newly added tab should become active. I could not find a property or event on XamTabControl that captures that new tab addition. Am I missing something?
The xamTabControl is a derived ItemsControl and ItemsControl doesn't raise any events when items are added. You will likely have to handle this in your region adapter as you add items to the control.
ItemsControl does not raise this event but XamTabControl could. I can try through region adapter but what if I was not using prism. If I am coding a simple WPF application and using XamTabControl, how do I get this to working?
You can submit a feature request for adding such an event if you like - http://devcenter.infragistics.com/Protected/RequestFeature.aspx. What you can probably do is in code hook into the CollectionChanged event of the Items property since the ItemsCollection is a CollectionView which implements INotifyCollectionChanged.