Ok, so figured out how to add the button to the RadTabItem head using a DataTemplate. I also can do this where I am creating the RadTabItem's programatically. My code looks something like this:
The RadTabHeaderTemplate is defined as:
here are the problems I am Having.
1. I want to bind the controls in the DataTemplate to properties of the MyObject class. Specifically, MyObject.Id and MyObject.ImageSource. I can't seem to get this binding to work.
2. In the OnClick event of the button, How do I get access to the DataContext of the RadTabItem. This is what I currently have, what do I need to add to access the MyObject Datacontext from the line above:
newTab.DataContext = MyObjec
t;
here is what I have now:
Finally, for the RadTabControl, I use DropDownDisplayMode="Visible". However, this shows everything in the RadTabHeaderTemplate (button, image and text) in the dropdown. Can I create a separate template to display only the text in the dropdown?
Thanks for any help you can offer here.