Doesn't your real-life app use the RadTabControl
in a PRISM scenario? If it does, it is best to create a region adapter as I previously suggested.
Unfortunately the scenario that you initially described cannot be implemented. Basically when the TabControl
is populated with visual objects, those visual elements are placed inside the RadTabItem
. However, due to framework limitations, when the RadTabItem
containers are generated to wrap the visual elements from the ItemsSource
collection, the RadTabItems Header
property isn't set. This is why when you place visual elements in the ItemsSource
collection there are no Headers
defined for those items and the HeaderTemplate
bindings aren't executed.
As a workaround you can manually set the Header
property of those RadTabItems
that will wrap visual elements like your ItemControl
MainWindow : Window
sender, RoutedEventArgs e)
RadTabItem item = (sender
item.Header = item.DataContext;
However, when the RadTabItem.Header
property is a visual element, in certain scenarios the GarbageCollector may not clean all its references due to framework limitations and this may lead to leaks.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items