Hello Vadims Geidans,
Unfortunately, it appears that this article is outdated. In order to change this foreground you have to edit the RadRibbonBar's Style, then use the "RibbonRadTabItemStyle". In it, the "HeaderElement" TabItemContentPresenter ' s Foreground property is set to "#000000".
In order to change the Foreground when the Tab is Selected, Mouse Hovered, or both you have to edit the Visual States, for example like so ( both Selected and MouseOver state):
<VisualState x:Name="SelectedMouseOver">
<Storyboard>
<ColorAnimation Duration="0" To="{StaticResource TabStripTabSelectedMouseOverOuterBorderColor}" Storyboard.TargetProperty="Color" Storyboard.TargetName="LeftOuterBorderBrush"/>
<ColorAnimation Duration="0" To="{StaticResource TabStripTabSelectedMouseOverOuterBorderColor}" Storyboard.TargetProperty="Color" Storyboard.TargetName="RightOuterBorderBrush"/>
<ColorAnimation Duration="0" To="{StaticResource TabStripTabSelectedMouseOverOuterBorderColor}" Storyboard.TargetProperty="Color" Storyboard.TargetName="MiddleOuterBorderBrush"/>
<ColorAnimation Duration="0" To="{StaticResource TabStripTabSelectedMouseOverLeftInnerBorderColor}" Storyboard.TargetProperty="Color" Storyboard.TargetName="LeftInnerBorderBrush"/>
<ColorAnimation Duration="0" To="{StaticResource TabStripTabSelectedMouseOverRightInnerBorderColor}" Storyboard.TargetProperty="Color" Storyboard.TargetName="RightInnerBorderBrush"/>
<ColorAnimation Duration="0" To="{StaticResource TabStripTabSelectedMouseOverMiddleInnerBorderColor}" Storyboard.TargetProperty="Color" Storyboard.TargetName="MiddleInnerBorderBrush"/>
<ColorAnimation Duration="0" To="{StaticResource TabStripTabSelectedBackgroundColor1}" Storyboard.TargetProperty="Color" Storyboard.TargetName="BackgroundBrush1"/>
<ColorAnimation Duration="0" To="{StaticResource TabStripTabSelectedBackgroundColor2}" Storyboard.TargetProperty="Color" Storyboard.TargetName="BackgroundBrush2"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="wrapper">
<DiscreteObjectKeyFrame KeyTime="0" Value="4,1,3,0"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="HeaderElement">
<DiscreteObjectKeyFrame KeyTime="0" Value="0,1,0,1"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderElement">
<DiscreteObjectKeyFrame KeyTime="0" Value="Blue" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
The lines in yellow are manually added.
We know this approach is far away from elegant but that's why we highly suggest you to use the new
RadRibbonView control where most of the issues from the RibbonBar are
resolved and the style is too simple and easy to maintain/change.
Please let us know if you need more info or assistance.
Best wishes,
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>