Språk

TextBoxBase.CaretBrush Egenskap

Definition

Hämtar eller ställer in penseln som används för att måla textrutans caret.

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

Egenskapsvärde

Borsten som används för att måla textrutans caret.

Exempel

I följande exempel skapas en TextBox och läggs till texten "Det här är lite text". I exemplet anges CaretBrush egenskaperna och Foreground för en TextBox till blå.

<TextBox SelectionBrush="Red" SelectionOpacity="0.5"
         Foreground="Blue" CaretBrush="Blue">  
  This is some text.
</TextBox>

Föregående exempel genererar utdata som liknar följande bild.

Textruta med CaretBrush inställd på blå. Textruta med CaretBrush inställd på blå

Gäller för