PasswordBox.SelectionBrush プロパティ

定義

選択されているテキストを強調表示するブラシを取得または設定します。

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

プロパティ値

Brush

選択されているテキストを強調表示するブラシ。

次の例では、プロパティを PasswordBox 作成し、プロパティを SelectionBrush 緑に、プロパティを SelectionOpacity 0.5 に設定します。

<PasswordBox SelectionBrush="Green" SelectionOpacity="0.5" 
             Foreground="Red" CaretBrush="Red"/>

前の例では、次の図のような出力を生成します。

緑に設定された SelectionBrush のある PasswordBox
SelectionBrush が緑に設定されている PasswordBox 内の選択されたテキスト

注釈

選択したテキストを強調表示するブラシを指定するには、プロパティをSelectionBrushSelectionOpacity設定します。

適用対象