Table of Contents

Class Buttons

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

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

public sealed class Buttons
Inheritance
Buttons
Inherited Members
Extension Methods

Remarks

The static members of this class simply delegate to the primary button device of the calling thread's input manager.

Constructors

Buttons()

public Buttons()

Fields

ButtonDownEvent

ButtonDown

public static readonly RoutedEvent ButtonDownEvent

Field Value

RoutedEvent

ButtonUpEvent

ButtonUp

public static readonly RoutedEvent ButtonUpEvent

Field Value

RoutedEvent

GotFocusEvent

GotFocus

public static readonly RoutedEvent GotFocusEvent

Field Value

RoutedEvent

LostFocusEvent

LostFocus

public static readonly RoutedEvent LostFocusEvent

Field Value

RoutedEvent

PreviewButtonDownEvent

PreviewButtonDown

public static readonly RoutedEvent PreviewButtonDownEvent

Field Value

RoutedEvent

PreviewButtonUpEvent

PreviewButtonUp

public static readonly RoutedEvent PreviewButtonUpEvent

Field Value

RoutedEvent

Properties

FocusedElement

Returns the element that the button is focused on.

public static UIElement FocusedElement { get; }

Property Value

UIElement

PrimaryDevice

The primary button device.

public static ButtonDevice PrimaryDevice { get; }

Property Value

ButtonDevice

Methods

Focus(UIElement)

Focuses the button on a particular element.

public static UIElement Focus(UIElement element)

Parameters

element UIElement

The element to focus the button on.

Returns

UIElement

GetButtonState(Button)

Returns the state of the specified button.

public static ButtonState GetButtonState(Button button)

Parameters

button Button

Returns

ButtonState

IsButtonDown(Button)

Returns whether or not the specified button is down.

public static bool IsButtonDown(Button button)

Parameters

button Button

Returns

bool

IsButtonHeld(Button)

Returns whether or not the specified button is held.

public static bool IsButtonHeld(Button button)

Parameters

button Button

Returns

bool

IsButtonUp(Button)

Returns whether or not the specified button is up.

public static bool IsButtonUp(Button button)

Parameters

button Button

Returns

bool