ContentPresenter.Foreground 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 Brush ,以套用至 ContentPresenter所處理的文字內容。
public:
property Brush ^ Foreground { Brush ^ get(); void set(Brush ^ value); };
Brush Foreground();
void Foreground(Brush value);
public Brush Foreground { get; set; }
var brush = contentPresenter.foreground;
contentPresenter.foreground = brush;
Public Property Foreground As Brush
<ContentPresenter Foreground="{StaticResource resourceName}"/>
- or -
<ContentPresenter Foreground="colorString"/>
- or -
<ContentPresenter>
<ContentPresenter.Foreground>singleBrush</ContentPresenter.Foreground>
</ContentPresenter>
屬性值
用來作為文字內容前景筆刷的筆刷。 預設值是純程式碼檢視方塊中的 Null 筆刷,但系統樣式預設會針對淺色主題) 將此設定為黑色 (或深色主題的白色 () 。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應