Hi Maxim,
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's
ItemsSource is populated with visual objects, those visual elements are placed inside the
RadTabItem's
Content. 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:
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.
Greetings,
Tina Stancheva
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?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items