Can you please elaborate more on your scenario and clarify what you have in mind when you say "dynamically create
". Do you need to apply different DataTemplate
to the Header
of any RadTabItem
at runtime? If so you can use DataTemplateSelector
instead. You can create a custom class deriving from the native DataTemplateSelector
and override the SelectTemplate()
method. In its implementation you can return the desired template based on your custom logic. Please note that you have to define the DataTemplates
in XAML and use the custom selector to switch them, only.
Furthermore, this approach is recommended to be used in MVVM scenarios. I hope this information will be in help. Feel free to ask if you have any other questions.
Pavel R. Pavlov