EN
Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

TextBlock.SelectionHighlightColor property

Applies to Windows and Windows Phone

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

Syntax


public SolidColorBrush SelectionHighlightColor { get; set; }


<TextBlock SelectionHighlightColor="{StaticResource resourceName}"/>



<TextBlock SelectionHighlightColor="colorString"/>


XAML Values

resourceName

The resource name (x:Key value) of an existing XAML resource that defines a brush. This is the recommended way to specify Brush values in XAML if you have any intention of using the same colors or brushes in more than one part of your UI. See Remarks in Brush or ResourceDictionary and XAML resource references.

colorString

The Color for a SolidColorBrush expressed as an attribute string. This can be a named color, an RGB value, or an ScRGB value. RGB or ScRGB may also specify alpha information. See the "XAML Values" section in Color.

Property value

Type: SolidColorBrush

The brush used to highlight the selected text. The default is a null brush from a pure code perspective, but the system uses base text styles to supply a runtime value for apps (unless you specifically override that style). The practical default is a brush using the theme resource TextSelectionHighlightThemeColor.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

TextBlock
Quickstart: Using brushes

 

 

Mostra:
© 2014 Microsoft