PasswordBox.SelectionBrush Egenskap

Definition

Hämtar eller ställer in penseln som markerar markerad text.

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

Egenskapsvärde

En pensel som markerar markerad text.

Exempel

I följande exempel skapas en PasswordBox och egenskapen anges SelectionBrush till grön och egenskapen SelectionOpacity till 0,5.

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

I föregående exempel skapas utdata som liknar följande bild.

PasswordBox med SelectionBrush inställt på grönt. Markerad text i en PasswordBox med SelectionBrush inställd på grön

Kommentarer

Du kan ange den pensel som markerar markerad text genom att ange SelectionBrush egenskaperna och SelectionOpacity .

Gäller för