Is it possible to add an image into the header of an RibbonTabItem? I tried this but in my case it does not work.
Is it possible to change the font size of the header of an RibbonTabItem?
Thanks for help.
Nico
The tabs of Office 2007 do not show images. In order to show an image, you would need to retemplate the RibbonTabItem. With regards to changing the font size, you can set the FontSize property of the RibbonTabItem or provide a style in the resources that sets this property. The latter option might be a problem if you are allowing the Theme property to be changed (since that would put a Style for TabItem into the resources). If you end up retemplating the RibbonTabItem then you can set the FontSize in your template.
Thank you very much for the answer. It really helped me.
I changed the template of the RibbonTabItem like this:
<Style x:Key="styleRibbonTabItemStaticData" TargetType="{x:Type infragisticsRibbon:RibbonTabItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<Image x:Name="image1" Height="32" Width="32" Source="/WpfPaMaPrototype;component/Resources/Icons/MainMenuStaticData.png"/>
<TextBlock x:Name="txtHeader" FontSize="14" Margin="4,7,0,0" Foreground="{DynamicResource MyBlueSolidBrush2}" Text="Stammdaten" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
It works. But I noticed that I will not have the effects onMouseOver, selected and so on for the RibbonTabItem. I want to say that the color of the RibbonTabItem does not change anymore. I think this is normal because I changed the template, but is it possible to specify this colors again? I don't know how can I get them? Maybe if I use some triggers, but I don't know what values should I write.
Thanks again very much for the help.
You might want to instead modify the default RibbonTabItem template. We include the default xaml with the install.
C:\Program Files\Infragistics\NetAdvantage for WPF 2007 Volume 2\DefaultStyles
It works. Thank you very much for the answer.
Have a nice day.