Table of Contents

Class EditorCommand

Namespace
The.Model.Editor
Assembly
Instagile.Model.dll
public sealed class EditorCommand : IEditorCommand, ICommand, INotifyPropertyChanged
Inheritance
EditorCommand
Implements
Inherited Members

Constructors

EditorCommand(Action, Func<bool>, string, Icon)

public EditorCommand(Action execute, Func<bool> canExecute, string name, Icon icon)

Parameters

execute Action
canExecute Func<bool>
name string
icon Icon

EditorCommand(Action, string, Icon)

public EditorCommand(Action execute, string name, Icon icon)

Parameters

execute Action
name string
icon Icon

EditorCommand(Func<IDialogHost, Task>, Func<bool>?, string, Icon)

public EditorCommand(Func<IDialogHost, Task> execute, Func<bool>? canExecute, string name, Icon icon)

Parameters

execute Func<IDialogHost, Task>
canExecute Func<bool>
name string
icon Icon

EditorCommand(Func<IDialogHost, Task>, string, Icon)

public EditorCommand(Func<IDialogHost, Task> execute, string name, Icon icon)

Parameters

execute Func<IDialogHost, Task>
name string
icon Icon

Properties

Icon

public Icon Icon { get; }

Property Value

Icon

IsAvailable

public bool IsAvailable { get; }

Property Value

bool

IsSeparator

true for the inert menu items produced by Separator(Func<bool>?), which views render as separator lines

public bool IsSeparator { get; }

Property Value

bool

Name

public string Name { get; }

Property Value

string

Methods

CanExecute(object?)

public bool CanExecute(object? parameter)

Parameters

parameter object

Returns

bool

Execute(object?)

public void Execute(object? parameter)

Parameters

parameter object

Execute(IDialogHost)

public Task Execute(IDialogHost host)

Parameters

host IDialogHost

Returns

Task

RaiseCanExecuteChanged()

public void RaiseCanExecuteChanged()

Separator(Func<bool>?)

create an inert command rendered as a separator line; it is shown only while isAvailable returns true

public static EditorCommand Separator(Func<bool>? isAvailable = null)

Parameters

isAvailable Func<bool>

Returns

EditorCommand

Events

CanExecuteChanged

public event EventHandler? CanExecuteChanged

Event Type

EventHandler

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler