How to set hyperlink text hover color in WINUI3

asked 2022-06-27T17:09:35.653+00:00
Voyageur Solitaire 1 Reputation point

The question title says it all. I find it frustrating that I can't find a property to set the hover color of my hyperlink text.
I'm targeting a somewhat custom theme, and the windows theme accent defaults are terrible for my needs.
In fact, I find myself never having any use for them, as I almost always use a custom color palette.
Isn't hyperlink hover color an important enough property, so as to have a dedicated property of its own?
Having to deal with visual states, or custom controls for something so simple seems like overkill.
Am I missing something?

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
430 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2022-06-27T17:43:33.093+00:00
    Castorix31 65,246 Reputation points

    You can change the default resources

    For example Blue and Red for hover with a HyperlinkButton :

    In App.xaml :

            <SolidColorBrush x:Key="HyperlinkButtonForeground" Color="Blue"/>  
            <SolidColorBrush x:Key="HyperlinkButtonForegroundPointerOver" Color="Red"/>  
    

    215388-hyperlinkcolors.gif