Class Label
A view that displays a single line of styled text.
public class Label : View
- Inheritance
-
Label
- Inherited Members
Properties
FontFamily
Gets or sets the font family used for rendering the text.
public string[] FontFamily { get; set; }
Property Value
- string[]
FontSize
Gets or sets the font size in points.
public NFloat FontSize { get; set; }
Property Value
FontStyle
Gets or sets the font style (e.g., normal, italic, oblique).
public FontStyle FontStyle { get; set; }
Property Value
FontWeight
Gets or sets the font weight (e.g., normal, bold, numeric weight).
public int FontWeight { get; set; }
Property Value
LineHeight
Gets or sets the line height of the text.
public NFloat LineHeight { get; set; }
Property Value
Text
Gets or sets the text content displayed by the label.
public string Text { get; set; }
Property Value
TextColor
Gets or sets the color used to fill the text.
public Color TextColor { get; set; }
Property Value
Methods
MeasureCore(Size, IMeasureContext)
Determines the minimum size that this view's border edge box requires, given the maximum available size. Margin is not part of this size.
protected override Size MeasureCore(Size availableBorderEdgeSize, IMeasureContext context)
Parameters
availableBorderEdgeSize
SizeThe maximum size available for the view’s border edge box. This size excludes margins, which are handled by the parent layout.
context
IMeasureContextThe layout metrics context providing access to platform-specific measurements, text sizing, and pixel snapping utilities.
Returns
- Size
The desired size of the border edge box based on content and layout logic.
RenderCore(IContext)
Renders the content and children of this view using the provided rendering context.
protected override void RenderCore(IContext context)
Parameters
context
IContextThe drawing context used for rendering visual content to the output surface.