【问题标题】:Change color for some part of text in WPF C# [closed]在 WPF C# 中更改部分文本的颜色 [关闭]
【发布时间】:2016-04-15 23:24:20
【问题描述】:

我的问题与:Change color and font for some part of text in WPF C#

有一个答案表明您可以使用以下语句更改文本前景色:

rangeOfText1.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.Blue);

但是,这对我不起作用:我收到一个运行时错误,表明参数类型 SolidBrush 不能用于 ForegroundProperty。怎么了?

【问题讨论】:

标签: c# wpf xaml


【解决方案1】:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-02-05
    • 2015-01-10
    • 1970-01-01
    • 1970-01-01
    • 2014-09-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多