Changing mouseover fontweight

2 posts, 0 answers
  1. Roger Tilson
    Roger Tilson avatar
    4 posts
    Member since:
    Apr 2010

    Posted 12 Apr 2010 Link to this post

    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>

     

  2. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 15 Apr 2010 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top