I am creating a UI in which a TabControl
has a series of standard TabItem
s with ordinary WPF controls as their content. The headers just display ordinary strings as usual. However, I want the header of the last item to contain a Button
instead of an ordinary string.
Let me stress that I already know how to do this without bindings. I want to do it with bindings. Specifically, the TabControl
is bound to an array of UserControl
s, except for the last object which is a Button
. It is this Button
that I want to appear in the header instead of as the content of the last TabItem
. (I frankly don't care what the content of the last TabItem
is. Only the header.)
I understand DataTemplateSelector
s and StyleSelector
s. What I can't figure out is what combination of styles and templates will do this for me. Specifically, I need to know what the Style
and DataTemplate
for the last item should look like, so that I can select them appropriately. No other code need be shown.