Share via


TextElement.Foreground 属性

定义

获取或设置要应用于此元素中内容的 Brush

public:
 property Brush ^ Foreground { Brush ^ get(); void set(Brush ^ value); };
Brush Foreground();

void Foreground(Brush value);
public Brush Foreground { get; set; }
var brush = textElement.foreground;
textElement.foreground = brush;
Public Property Foreground As Brush
<textElementForeground="{StaticResource resourceName}"/>
- or -
<textElementForeground="colorString"/>
- or -
<textElement>
  <textElement.Foreground>singleBrush</textElement.Foreground>
</textElement>

属性值

应用于文本内容的画笔。 默认值为颜色值为黑色SolidColorBrush

注解

设置 Foreground 对 LineBreakInlineUIContainer 对象没有可见效果。

适用于

另请参阅