Label

Represents a control used for displaying text, both single and multi-line.

Properties

PropertyTypeDescription
BackgroundColorThe background color of the control.
ForegroundColorThe color of the control's content.
FontSizeFloatThe size of the text in dp pixels.
FontStyleEnumThe style in which the text is rendered. Possible values are Normal & Italic.
FontWeightEnumThe thickness of the specified font. Possible values are Thin, Light, Normal, Medium, Bold, Black
TextStringA string that specifies the text contents of the button.
TextAlignmentEnumA value that indicates the horizontal alignment of text content. Possible values are Left, Right, & Center.
TextDecorationsEnumA value that indicates what decorations are applied to the text. Possible values are None, Strikethrough, & Underline.
TextTrimmingEnumThe text trimming behavior to employ when content overflows the content area. Possible values are None, CharacterEllipsis, & WordEllipsis.
TextWrappingEnumA value that indicates how the Label wraps text. Possible values are NoWrap & Wrap.
HeightFloatThe suggested height of the control in dp pixels.
HorizontalAlignmentEnumThe horizontal alignment characteristics that are applied to the control when it is composed in a parent layout panel, such as a Grid.
MarginThicknessThe outer margin that is applied to the control when it is composed in a parent layout panel, such as a Grid.
PaddingThicknessThe amount of space between the content of the control and its border.
RotationIntegerThe rotation about the Z-axis in degrees.
VerticalAlignmentEnumThe vertical alignment characteristics that are applied to the control when it is composed in a parent layout panel, such as a Grid.
WidthFloatThe suggested width of the control in dp pixels.
IsEnabledBooleanA value that indicates whether the user can interact with the control.
IsHitTestVisibleBooleanA value that indicates whether the contained area of the control can return true values for hit testing.
IsVisibleBooleanA value that indicates whether the control should be visible.
OpacityFloatA value between 0 and 1.0 that declares the opacity factor, with 1.0 meaning full opacity and 0 meaning transparent.

Events

EventDescription
LoadedOccurs when the element is laid out, rendered, and ready for interaction.
UnloadedOccurs when the element is no longer rendered on the screen.