BorderBrushAction Class
Definition
Action for setting border color on block elements (Paragraph, Section, etc.).
public class 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:
- Avalonia.Controls.Documents.Primitives.Actions.BorderThicknessAction - Define border width
- Avalonia.Controls.Documents.Primitives.Actions.BlockBackgroundAction - Add background color
- Avalonia.Controls.Documents.Primitives.Actions.PaddingAction - Add internal spacing
Constructors
| Name | Description |
|---|---|
| BorderBrushAction | No summary available. |
BorderBrushAction Constructor
public BorderBrushAction()
Methods
| Name | Description |
|---|---|
| GetAvailableValues | No summary available. |
GetAvailableValues Method
public System.Collections.Generic.IEnumerable<Avalonia.Media.IBrush> GetAvailableValues()
Returns
System.Collections.Generic.IEnumerable<Avalonia.Media.IBrush>
Properties
| Name | Description |
|---|---|
| DisplayName | No summary available. |
| Gesture | No summary available. |
| Id | No 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; }