PasswordBox.CaretBrush プロパティ

定義

パスワード ボックスのキャレットの色を指定するブラシを取得または設定します。

public:
 property System::Windows::Media::Brush ^ CaretBrush { System::Windows::Media::Brush ^ get(); void set(System::Windows::Media::Brush ^ value); };
public System.Windows.Media.Brush CaretBrush { get; set; }
member this.CaretBrush : System.Windows.Media.Brush with get, set
Public Property CaretBrush As Brush

プロパティ値

パスワード ボックスのキャレットの色を表すブラシ。

次の例では、 をPasswordBox作成し、 と ForegroundCaretBrush赤に設定します。

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

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

CaretBrush が赤に設定された PasswordBox。
CaretBrush を赤に設定した PasswordBox

注釈

の プロパティPasswordBoxCaretBrush設定して、キャレットの色を指定できます。 たとえば、 プロパティと同じ値Foregroundに設定CaretBrushできます。 Foreground は、 内の文字の PasswordChar 色を PasswordBox示します。

適用対象