Skip to main content

BorderThicknessAction Class

Definition

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

Action for setting border thickness on block elements (Paragraph, Section, etc.).

public class BorderThicknessAction

Inheritance: BlockPropertyAction<Thickness> -> BorderThicknessAction

Remarks

Border thickness controls the width of the border drawn around a block element. Borders are drawn between the margin (outside) and padding (inside) of a block.

Common border thickness values:

  • 0 - No border (default)
  • 1 - Thin border (standard)
  • 2 - Medium border (emphasis)
  • 3 - Thick border (strong emphasis)

Note: Border thickness alone won't make the border visible. You must also set Avalonia.Controls.Documents.Primitives.Actions.BorderBrushAction to define the border color.

This action sets uniform border thickness (all sides equal). For non-uniform borders (different thickness on each side), use a dedicated border editor panel.

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

Tip: Combine with Avalonia.Controls.Documents.Primitives.Actions.BlockBackgroundAction and Avalonia.Controls.Documents.Primitives.Actions.PaddingAction to create visually distinct callout boxes, quotes, or code blocks.

Constructors

NameDescription
BorderThicknessActionNo summary available.

BorderThicknessAction Constructor

public BorderThicknessAction()

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