fipcurren88 fipcurren88 - 1 year ago 193
C# Question

Remove Underline from HyperlinkButton - XAML

I need to remove underline in this content of HyperLinkButton.
"TextDecorations" not exist in this XAML Element.

<HyperlinkButton x:Name="BtnTeste"
Width="100" Height="50" BorderThickness="1"
Foreground="Black" Background="#ffffff"

Someone help me?

Answer Source

This underline is not exposed inside the HyperlinkButton style. Fortunately, you can easily override its ContentTemplate to get rid of it.

<HyperlinkButton Content="my link">
            <TextBlock Text="{Binding}" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download