Skip to content

Run class

A styled span of text inside Inlines. Unset properties fall back to the owning TextBlock, so a run only states what it overrides.

Guide: C# Markup reference: Text

public sealed class Run : MewObject
name description
Run() The default constructor.
Run(…)
Background { get; set; } Gets or sets the highlight color painted behind the run; null paints nothing.
BaselineOffset { get; set; } Gets or sets the baseline shift in DIPs; positive raises the run above the line’s baseline.
Decoration { get; set; } Gets or sets underline and strikethrough for the run.
FontFamily { get; set; } Gets or sets the font family; null inherits from the owning text element.
FontSize { get; set; } Gets or sets the font size in points; null inherits from the owning text element.
FontWeight { get; set; } Gets or sets the font weight; null inherits from the owning text element.
Foreground { get; set; } Gets or sets the text color; null inherits from the owning text element.
Italic { get; set; } Gets or sets whether the run renders italic.
Text { get; set; } Gets or sets the run text.
static readonly BackgroundProperty
static readonly BaselineOffsetProperty
static readonly DecorationProperty
static readonly FontFamilyProperty
static readonly FontSizeProperty
static readonly FontWeightProperty
static readonly ForegroundProperty
static readonly ItalicProperty
static readonly TextProperty