-api-id | -api-type |
---|---|
P:Windows.UI.Xaml.Controls.PasswordBox.SelectionHighlightColor |
winrt property |
Gets or sets the brush used to highlight the selected text.
<PasswordBox SelectionHighlightColor="{StaticResource resourceName}"/>
- or -
<PasswordBox SelectionHighlightColor="colorString"/>
- resourceName
- resourceNameThe resource name (x:Key attribute 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
- colorStringThe 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.
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.