Skip to main content

InsertTableAction Class

Definition

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

Action for inserting a new Avalonia.Controls.Documents.Table after the current block.

public class InsertTableAction

Inheritance: object -> EditorAction -> InsertTableAction

Remarks

This action is typically invoked through a grid-picker flyout that determines the row and column counts. Call Avalonia.Controls.Documents.Primitives.Actions.InsertTableAction.ExecuteWithSize(Avalonia.Controls.Documents.Primitives.ITextEditorHost,int,int) to insert a table with specific dimensions.

The default Avalonia.Controls.Documents.Primitives.Actions.InsertTableAction.Execute(Avalonia.Controls.Documents.Primitives.ITextEditorHost) creates a 3x3 table as a fallback.

Constructors

NameDescription
InsertTableActionNo summary available.

InsertTableAction Constructor

public InsertTableAction()

Methods

NameDescription
CanExecuteNo summary available.
ExecuteNo summary available.
ExecuteWithSizeInserts a table with the specified dimensions after the current block, or at the document root when the document is empty.
ExecuteAsyncExecutes the action asynchronously. Inherited from EditorAction.
GetStateGets the current state of the action. Inherited from EditorAction.

CanExecute Method

public bool CanExecute(Avalonia.Controls.Documents.Primitives.ITextEditorHost host)

Parameters

host Avalonia.Controls.Documents.Primitives.ITextEditorHost

Returns

bool

Execute Method

public void Execute(Avalonia.Controls.Documents.Primitives.ITextEditorHost host)

Parameters

host Avalonia.Controls.Documents.Primitives.ITextEditorHost

ExecuteWithSize Method

Inserts a table with the specified dimensions after the current block, or at the document root when the document is empty.

public void ExecuteWithSize(Avalonia.Controls.Documents.Primitives.ITextEditorHost host, int rowCount, int colCount)

Parameters

host Avalonia.Controls.Documents.Primitives.ITextEditorHost

The editor host.

rowCount int

Number of rows (>= 1).

colCount int

Number of columns (>= 1).

Properties

NameDescription
DisplayNameNo summary available.
IdNo summary available.
GestureGets the optional keyboard gesture for this action. Inherited from EditorAction.

DisplayName Property

public string DisplayName { get; set; }

Id Property

public string Id { get; set; }