InsertTableAction Class
Definition
Action for inserting a new Avalonia.Controls.Documents.Table after the current block.
public class 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
| Name | Description |
|---|---|
| InsertTableAction | No summary available. |
InsertTableAction Constructor
public InsertTableAction()
Methods
| Name | Description |
|---|---|
| CanExecute | No summary available. |
| Execute | No summary available. |
| ExecuteWithSize | Inserts a table with the specified dimensions after the current block, or at the document root when the document is empty. |
| ExecuteAsync | Executes the action asynchronously. Inherited from EditorAction. |
| GetState | Gets 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
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
| Name | Description |
|---|---|
| DisplayName | No summary available. |
| Id | No summary available. |
| Gesture | Gets the optional keyboard gesture for this action. Inherited from EditorAction. |
DisplayName Property
public string DisplayName { get; set; }
Id Property
public string Id { get; set; }