Skip to main content

PaddingAction Class

Definition

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

Action for setting uniform padding on block elements (Paragraph, Section, etc.).

public class PaddingAction

Inheritance: BlockPropertyAction<Thickness> -> PaddingAction

Remarks

Padding controls the spacing inside the block element's border, between the border and the content. This action sets uniform padding on all four sides.

Common padding values:

  • 0 - No padding (content touches border)
  • 5 - Minimal internal spacing
  • 10 - Comfortable reading space
  • 15 - Generous internal spacing
  • 20 - Large padding for callout boxes

Padding is particularly useful when combined with borders or backgrounds to create visually distinct blocks like quotes, code blocks, or callouts.

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

Note: This action sets uniform padding only. For non-uniform padding (different values for each side), use a dedicated padding editor panel.

Constructors

NameDescription
PaddingActionNo summary available.

PaddingAction Constructor

public PaddingAction()

Methods

NameDescription
GetAvailableValuesNo summary available.

GetAvailableValues Method

public System.Collections.Generic.IEnumerable<Avalonia.Thickness> GetAvailableValues()

Returns

System.Collections.Generic.IEnumerable<Avalonia.Thickness>

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; }