-
I wanted to put an icon into the tab. The header property is of type object. So I thought it would be the normal WPF way. that I can put a StackPanel inside that contains what I wanted to show. But it seems, that the object is then shown with a simple .ToSting() implementation. EDIT: My thoght was about instead of putting the header into a Textblock, you maybe could check if the content of the HeaderProperty is a UIElement or FrameworkElement and if yes, put it into a ContentPresenter. And if it is a string, put it into a TextBlock. So for noone would anything change, but it would give us more flexibility in what we want to show in the Tab.Header. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The default HeaderTemplate for RibbonTabItem is defined as a TextBlock in it's style. |
Beta Was this translation helpful? Give feedback.
The default HeaderTemplate for RibbonTabItem is defined as a TextBlock in it's style.
You have to either inherit the style and overwrite the HeaderTemplate there or change it for your specific RibbonTabItem instance.