Attributes
Name | Use |
---|---|
HighlightBrush | Set Control Highlight Color |
HighlightBackground | Set the highlight background color of the control |
HighlightBorderBrush | Set the highlight border color of the control |
HighlightForeground | Set the highlight foreground color of the control |
Text | Set text content |
Use Cases
HighlightBrush Set control highlight color
1 | <UniformGrid Margin="22,22,0,0" Rows="2" Columns="2"> |
The following screenshot is a set of highlight comparison results when selected. The left picture is the style default color
, and the right is the personal custom color
.
Text Set text content
It is mainly used to set the auxiliary text of the control. When the control does not have appropriate properties for displaying the text, this additional property can be set in the custom style.
For example: when the custom progress bar needs to display text, it lacks the property of displaying extra text content, and the corresponding text can be displayed through a custom style, with Text
as the text content carrying property
Custom style:
1 | <Style x: Key = "ProgressBarBaseStyle" TargetType = "ProgressBar"> |
Use in xaml
:
1 | <UniformGrid Margin = "22,22,0,0" Rows = "2" Columns = "2"> |
effect: