derives from the native ItemsControl
and this is why it exposes ItemTemplateSelector
properties. As far as I understand your requirement you want to use ItemTemplateSelector
in your application.
In order to do so, you can create a custom class deriving from the native DataTemplateSelector
. Furthermore you can override the SelectTemplate()
method. In it you can implement your custom logic for switching the templates. Please note that you will have to define public properties that will be associated with the desired DataTemplates
After creating your custom class, you can define your DataTemplates
that will be applied based on your custom logic. This can be done in XAML. Next, you can create an instance of the custom ItemTemplateSelector
and associate its properties (previously defined) with the DataTemplates
that you have just defined.
Finally you can set the ItemTemplateSelector
property of the RadTabControl
For your convenience I implemented this approach in the attached project. Please take a look at it and let me know if you need any further assistance. If you need more explanations about the usage of the selectors you can refer to this blog post
Pavel R. Pavlov