Windows phone 8.1 如何在C for Windows Phone中设置TextBlock的前台属性

Windows phone 8.1 如何在C for Windows Phone中设置TextBlock的前台属性,windows-phone-8.1,textblock,foreground,Windows Phone 8.1,Textblock,Foreground,由于某些原因,我在设置文本块的前景时遇到问题 我试过: 新的SolidColorBrushWindows.UI.Color;但是没有颜色,白色或者其他颜色。 我找不到画笔。颜色类 我正在使用Windows Phone 8.1应用程序。它必须是颜色类,但不是颜色。例如: var textblocks = new TextBlock() { Height = box_height, Width = box_width, Text = "Hello", FontSize = 30, Foregroun

由于某些原因,我在设置文本块的前景时遇到问题

我试过:

新的SolidColorBrushWindows.UI.Color;但是没有颜色,白色或者其他颜色。 我找不到画笔。颜色类
我正在使用Windows Phone 8.1应用程序。

它必须是颜色类,但不是颜色。例如:

var textblocks = new TextBlock() { Height = box_height, Width = box_width, Text = "Hello", FontSize = 30, Foreground = new SolidColorBrush(Colors.Black) };

我收到一条消息:“名称颜色在当前上下文中不存在”。我觉得奇怪的是,我没有在标准页面中对此进行适当的引用;应该行的,就是这样。非常感谢。