語言

TextElement.Foreground 屬性

定義

取得或設定筆 刷 套用到這個元素的內容上。

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 , 顏色 值為 黑色。

備註

設定前景對 LineCut 或 InlineUIContainer 物件沒有明顯影響。

適用於

另請參閱