I am not sure if you are using a data-binding approach in your code snippet. I see static defined (XAML defined) data, such as images in combination with DataTemplates
(which are designed to be used in data-binding approach) for the Headers
of the RadTabItems
In declaratively defined RadTabItems
, you can set the RadTabItem.Header
property to your custom layout (without using DataTemplates
). By doing so you will be able to change the Source
of the images property in code-behind when the SelectionChanged
event is triggered.
Take a look at the attached project and let me know if it works in your scenario.
All the best,
Pavel R. Pavlov
the Telerik team