I'm trying to underline the content of a button using VisualStates but I'm failing to do so.
Ideally, I'd love to do it the same way I can change the FontWeight of the content,
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="FontWeight" Storyboard.TargetName="ContentPresenter">
<DiscreteObjectKeyFrame KeyTime="0" Value="Bold"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
But the following is not valid,
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="FontStyle" Storyboard.TargetName="ContentPresenter">
<DiscreteObjectKeyFrame KeyTime="0" Value="Underline"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
I've read about the Underline class and how you can use it with Runs but found no way to do this using VisualStates.
Is there a way of doing this? Or any other way to toggle an underlined effect on the content of a button on PointerOver?
Thanks in advance.