PasswordBox.SelectionBrush 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定會反白顯示所選取文字的筆刷。
public:
property System::Windows::Media::Brush ^ SelectionBrush { System::Windows::Media::Brush ^ get(); void set(System::Windows::Media::Brush ^ value); };
public System.Windows.Media.Brush SelectionBrush { get; set; }
member this.SelectionBrush : System.Windows.Media.Brush with get, set
Public Property SelectionBrush As Brush
屬性值
會反白顯示所選取文字的筆刷。
範例
下列範例會建立 , PasswordBox 並將 SelectionBrush 屬性設定為綠色, SelectionOpacity 並將 屬性設定為 0.5。
<PasswordBox SelectionBrush="Green" SelectionOpacity="0.5"
Foreground="Red" CaretBrush="Red"/>
上述範例會產生類似下圖的輸出。
PasswordBox 中選取的文字,並將 SelectionBrush 設定為綠色
備註
您可以藉由設定 和 SelectionOpacity 屬性,指定醒目提示選取文字的 SelectionBrush 筆刷。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應