Table of Contents

Method Run

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Run(KeyInfo[], KeyEventArgs, Action?, bool)

Runs action if any of the keys is pressed.

public static bool Run(KeyInfo[] keys, KeyEventArgs e, Action? action = null, bool setHandled = true)

Parameters

keys KeyInfo[]

Array of keys.

e KeyEventArgs

Event arguments.

action Action

Action to run.

setHandled bool

Specifies whether to set event arguments Handled property.

Returns

bool

true if key is pressed; false otherwise.

Run(KeyEventArgs, Action?, bool)

Runs action if this key is pressed.

public bool Run(KeyEventArgs e, Action? action = null, bool setHandled = true)

Parameters

e KeyEventArgs

Event arguments.

action Action

Action to run.

setHandled bool

Specifies whether to set event arguments Handled property.

Returns

bool

true if key is pressed; false otherwise.