Skip to main content

BorderBrushAction Class

Definition

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

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

public class BorderBrushAction

Inheritance: BlockPropertyAction<IBrush> -> BorderBrushAction

Remarks

Border brush (color) defines the color of the border drawn around a block element. The border is drawn between the margin (outside) and padding (inside) of a block.

Note: The border won't be visible unless you also set Avalonia.Controls.Documents.Primitives.Actions.BorderThicknessAction to a non-zero value. The border brush defines the color, while border thickness defines the width.

This action is designed to work with Avalonia.Controls.Documents.Primitives.Toolbar.ColorPickerTool. It returns null for available values, indicating the UI should use a color picker instead of a dropdown with predefined values.

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

Common Use Cases:

  • Creating outlined callout boxes
  • Highlighting important quotes with colored borders
  • Framing code blocks or examples
  • Building color-coded sections

Tip: For a complete bordered block, combine with:

Constructors

NameDescription
BorderBrushActionNo summary available.

BorderBrushAction Constructor

public BorderBrushAction()

Methods

NameDescription
GetAvailableValuesNo summary available.

GetAvailableValues Method

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

Returns

System.Collections.Generic.IEnumerable<Avalonia.Media.IBrush>

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