Skip to content

TextBlock class

Lightweight text element (WPF-like) that does not carry full Control features. Inherits ForegroundProperty, FontFamilyProperty, FontSizeProperty, and FontWeightProperty so that inherited values propagate naturally from parent controls without style-target interference.

Guide: C# Markup reference: Text

public class TextBlock : TextBlockBase
name description
TextBlock() The default constructor.
Inlines { get; } Gets the styled runs that make up the content. Runs take precedence over a directly assigned Text, which then reports their concatenated text.
Text { get; set; } Gets or sets the text content; setting it replaces Inlines, and while runs are present the value is their concatenated text.
static readonly TextProperty