TextBoxBase.SelectionBrush Propiedad

Definición

Obtiene o establece el pincel que resalta el texto seleccionado.

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

Valor de propiedad

Pincel que resalta el texto seleccionado.

Ejemplos

En el ejemplo siguiente se crea un TextBox elemento y se agrega el texto "Este es un texto". En el ejemplo se establece la SelectionBrush propiedad en rojo y la SelectionOpacity propiedad en 0,5 para personalizar la apariencia del texto seleccionado.

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

En la ilustración siguiente se muestra el TextBox del ejemplo anterior con su texto seleccionado.

TextBox con un TextBox selectionBrush rojo
Texto seleccionado en un TextBox con SelectionBrush establecido en rojo

Comentarios

Puede especificar el pincel que resalta el texto seleccionado estableciendo las SelectionBrush propiedades y SelectionOpacity . La SelectionOpacity propiedad especifica la opacidad de .SelectionBrush

Se aplica a