Table of Contents

Class ButtonDevice

Namespace
nanoFramework.UI.Input
Assembly
nanoFramework.Graphics.dll

The ButtonDevice class represents the button device to the members of a context.

public sealed class ButtonDevice : InputDevice
Inheritance
ButtonDevice
Inherited Members
Extension Methods

Properties

DeviceType

Device Type

public override InputManager.InputDeviceType DeviceType { get; }

Property Value

InputManager.InputDeviceType

Target

Returns the element that input from this device is sent to.

public override UIElement Target { get; }

Property Value

UIElement

Methods

Focus(UIElement)

Focuses the button input on a particular element.

public UIElement Focus(UIElement obj)

Parameters

obj UIElement

The element to focus the button pad on.

Returns

UIElement

Element focused to

GetButtonState(Button)

Returns the state of the specified button.

public ButtonState GetButtonState(Button button)

Parameters

button Button

Returns

ButtonState

IsButtonDown(Button)

Returns whether or not the specified button is down.

public bool IsButtonDown(Button button)

Parameters

button Button

Returns

bool

IsButtonHeld(Button)

Returns whether or not the specified button is held.

public bool IsButtonHeld(Button button)

Parameters

button Button

Returns

bool

IsButtonUp(Button)

Returns whether or not the specified button is up.

public bool IsButtonUp(Button button)

Parameters

button Button

Returns

bool