Table of Contents

Class ViewportCommand

Namespace
HelixToolkit.WinUI.SharpDX
Assembly
HelixToolkit.WinUI.SharpDX.dll

An ICommand implementation that can be bound to an InputGesture in XAML using InputBinding derivations.

[CreateFromString(MethodName = "CreateFromString")]
public class ViewportCommand : ICommand
Inheritance
ViewportCommand
Implements
Inherited Members

Properties

CanExecuteHandler

public Func<object?, bool>? CanExecuteHandler { get; set; }

Property Value

Func<object, bool>

ExecuteHandler

public Action<object?>? ExecuteHandler { get; set; }

Property Value

Action<object>

Id

public ViewportCommands.Id Id { get; }

Property Value

ViewportCommands.Id

Methods

CanExecute(object?)

Defines the method that determines whether the command can execute in its current state.

public bool CanExecute(object? parameter)

Parameters

parameter object

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Returns

bool

true if this command can be executed; otherwise, false.

CreateFromString(string)

public static ViewportCommand? CreateFromString(string value)

Parameters

value string

Returns

ViewportCommand

Execute(object?)

Defines the method to be called when the command is invoked.

public void Execute(object? parameter)

Parameters

parameter object

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Get(Id)

public static ViewportCommand? Get(ViewportCommands.Id id)

Parameters

id ViewportCommands.Id

Returns

ViewportCommand

Events

CanExecuteChanged

Occurs when changes occur that affect whether or not the command should execute.

public event EventHandler? CanExecuteChanged

Event Type

EventHandler