This is a migrated thread and some comments may be shown as answers.

Changing mouseover fontweight

1 Answer 85 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Roger Tilson
Top achievements
Rank 1
Roger Tilson asked on 12 Apr 2010, 04:15 PM
I am using nested tabs and styling my high-level tabs not to look like tabs. They are more like a simple header link list. The styling has worked fine, was easy, but I would like to change the fontweight to bold on mouseover. Here is the section of code I am using. The styling of the IsSelected states is working fine, but I can't get the IsMouseOver styling to work. What am I doing wrong?


 

 

<ControlTemplate.Triggers>

 

 

 

<Trigger Property="IsMouseOver" Value="True">

 

 

 

<Setter Property="Stroke" TargetName="OuterPath" Value="#6600BCFF"/>

 

 

 

<Setter Property="Stroke" TargetName="OuterFill" Value="#6600BCFF"/>

 

 

 

<Setter Property="FontWeight" TargetName="HeaderElement" Value="Bold"/>

 

 

 

<Setter Property="FontSize" TargetName="HeaderElement" Value="16"/>

 

 

 

<Setter Property="Foreground" TargetName="HeaderElement" Value="Blue"/>

 

 

 

<Setter Property="Background" TargetName="InnerFill">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.500008,0" StartPoint="0.500008,1.00006">

 

 

 

<GradientStop Color="#FFE3F6FF" Offset="0"/>

 

 

 

<GradientStop Color="#FFBFEAFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Fill" TargetName="InnerPath">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.500008,0" StartPoint="0.500008,1.00006">

 

 

 

<GradientStop Color="#FFE3F6FF" Offset="0"/>

 

 

 

<GradientStop Color="#FFBFEAFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

</Trigger>

 

 

 

<Trigger Property="IsSelected" Value="False">

 

 

 

<Setter Property="Stroke" TargetName="OuterPath">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

<GradientStop Color="#4000BCFF" Offset="0"/>

 

 

 

<GradientStop Color="#6600BCFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Stroke" TargetName="OuterFill">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

<GradientStop Color="#4000BCFF" Offset="0"/>

 

 

 

<GradientStop Color="#6600BCFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Background" TargetName="InnerFill" Value="Transparent"/>

 

 

 

<Setter Property="Fill" TargetName="InnerPath" Value="White"/>

 

 

 

<Setter Property="Margin" TargetName="wrapper" Value="0,0,-10,-2"/>

 

 

 

<Setter Property="Foreground" TargetName="HeaderElement" Value="Blue"/>

 

 

 

<Setter Property="FontWeight" TargetName="HeaderElement" Value="Normal"/>

 

 

 

<Setter Property="FontSize" TargetName="HeaderElement" Value="16"/>

 

 

 

<Setter Property="Margin" TargetName="HeaderElement" Value="2"/>

 

 

 

<Setter Property="Cursor" Value="Hand"/>

 

 

 

</Trigger>

 

 

 

 

<Trigger Property="IsSelected" Value="True">

 

 

 

<Setter Property="Stroke" TargetName="OuterPath">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

<GradientStop Color="#4000BCFF" Offset="0"/>

 

 

 

<GradientStop Color="#6600BCFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Stroke" TargetName="OuterFill">

 

 

 

<Setter.Value>

 

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

<GradientStop Color="#4000BCFF" Offset="0"/>

 

 

 

<GradientStop Color="#6600BCFF" Offset="1"/>

 

 

 

</LinearGradientBrush>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

<Setter Property="Background" TargetName="InnerFill" Value="Transparent"/>

 

 

 

<Setter Property="Fill" TargetName="InnerPath" Value="White"/>

 

 

 

<Setter Property="Margin" TargetName="wrapper" Value="0,0,-10,-2"/>

 

 

 

<Setter Property="Foreground" TargetName="HeaderElement" Value="#262626"/>

 

 

 

<Setter Property="FontWeight" TargetName="HeaderElement" Value="Bold"/>

 

 

 

<Setter Property="FontSize" TargetName="HeaderElement" Value="16"/>

 

 

 

<Setter Property="Margin" TargetName="HeaderElement" Value="2"/>

 

 

 

</Trigger>

 

 

 

<Trigger Property="IsEnabled" Value="False">

 

 

 

<Setter Property="Opacity" TargetName="HeaderElement" Value="0.5"/>

 

 

 

</Trigger>

 

 

 

</ControlTemplate.Triggers>

 

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 15 Apr 2010, 08:59 AM
Hello Roger,

Please find attached an example.

If you have further questions please do not hesitate to ask us.
I hope this will help you.

Best wishes,
Dimitrina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TabControl
Asked by
Roger Tilson
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or