DeleteImageAction Class
Definition
Deletes the inline Avalonia.Controls.Documents.RichImage at the current selection or caret.
public class DeleteImageAction
Remarks
Enabled only when an image is the current context (see Avalonia.Controls.Documents.Primitives.BlockContextResolver.GetContextImage(Avalonia.Controls.Documents.Primitives.ITextEditorHost)). Deleting and undoing restores the image whole. Removal goes through Avalonia.Controls.Documents.TextModel.TextDocument.DeleteNode(Avalonia.Controls.Documents.TextModel.TextDocumentNode) so the image node is detached cleanly — a character-range delete would strip the object character but leave a zero-length orphan node behind.
Constructors
| Name | Description |
|---|---|
| DeleteImageAction | No summary available. |
DeleteImageAction Constructor
public DeleteImageAction()
Methods
| Name | Description |
|---|---|
| CanExecute | No summary available. |
| Execute | No summary available. |
| 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
Properties
| Name | Description |
|---|---|
| DisplayName | No summary available. |
| Gesture | Gets the optional keyboard gesture for this action. Inherited from EditorAction. |
| Id | No summary available. |
DisplayName Property
public string DisplayName { get; set; }
Id Property
public string Id { get; set; }