Skip to main content

LineHeightAction Class

Definition​

Assembly:Avalonia.Controls.RichTextEditor
Package:Avalonia.Controls.RichTextEditor

Action for setting line height on block elements (Paragraph, Section, etc.).

public class LineHeightAction

Inheritance: BlockPropertyAction<double> -> LineHeightAction

Remarks​

Line height is a block-level property that controls the vertical spacing between lines. Important: Unlike CSS where line-height can be a unitless multiplier, this property uses absolute pixel/point values.

Common line height values:

  • 14 - Very tight spacing
  • 16 - Compact spacing
  • 18 - Normal spacing (default for 12pt font)
  • 20 - Comfortable reading
  • 24 - Generous spacing
  • 28 - Extra spacing
  • 32 - Wide spacing for headers

When applied to a selection spanning multiple paragraphs, all affected paragraphs will have their line height set to the specified value.

Constructors​

NameDescription
LineHeightActionNo summary available.

LineHeightAction Constructor​

public LineHeightAction()

Methods​

NameDescription
GetAvailableValuesNo summary available.

GetAvailableValues Method​

public System.Collections.Generic.IEnumerable<double> GetAvailableValues()

Returns​

System.Collections.Generic.IEnumerable<double>

Properties​

NameDescription
DisplayNameNo summary available.
GestureNo summary available.
IdNo summary available.

DisplayName Property​

public string DisplayName { get; set; }

Gesture Property​

public Avalonia.Input.KeyGesture Gesture { get; set; }

Id Property​

public string Id { get; set; }