Udostępnij za pośrednictwem


RichEditBox.SelectionHighlightColor Property

Definition

Gets or sets the brush used to highlight the selected text.

public:
 property SolidColorBrush ^ SelectionHighlightColor { SolidColorBrush ^ get(); void set(SolidColorBrush ^ value); };
SolidColorBrush SelectionHighlightColor();

void SelectionHighlightColor(SolidColorBrush value);
public SolidColorBrush SelectionHighlightColor { get; set; }
var solidColorBrush = richEditBox.selectionHighlightColor;
richEditBox.selectionHighlightColor = solidColorBrush;
Public Property SelectionHighlightColor As SolidColorBrush
<RichEditBox SelectionHighlightColor="{StaticResource resourceName}"/>
- or -
<RichEditBox SelectionHighlightColor="colorString"/>

Property Value

The brush used to highlight the selected text. The default is a null brush from a pure code perspective, but the default control template for RichEditBox applies a theme resource brush for this in a runtime instance of a RichEditBox control.

Remarks

The control template sets the default selection highlight color to the system resource TextSelectionHighlightColorThemeBrush. To change the selection highlight color for all editable text controls in your app, you can override the TextSelectionHighlightColorThemeBrush system resource in App.xaml. This will affect PasswordBox, TextBox, and RichEditBox controls. For more info, see XAML theme resources.

Applies to

See also