[UWP] [XAML]如何更改超链接控件的颜色? [英] [UWP][XAML] How can I change the color of Hyperlink control?

查看:135
本文介绍了[UWP] [XAML]如何更改超链接控件的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个具有强调色背景的自定义控件(它是一个"聊天气泡"控件)。我在此控件中有几个TextBlocks和Hyperlinks,但由于超链接控件默认情况下具有强调颜色,因此它们不可见。
如何更改超链接的颜色?

Hello, I have a custom control which has accent color background (it is a "chat bubble" control). I have several TextBlocks and Hyperlinks inside this control but since hyperlink controls have accent color by default, they are not visible. How can I change the color of the hyperlinks?

我找到了基于Xaml的旧应用程序的解决方案,但他们使用了样式在Windows 10上无效的触发器。

I have found a solution for older Xaml based apps but they use style triggers which did not work on Windows 10.

推荐答案

您好,

HyperLink继承自具有前景属性的TextElemen。

HyperLink inherit from TextElemen which has foreground property.


这篇关于[UWP] [XAML]如何更改超链接控件的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆