ButtonDevice Class
NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Input
The ButtonDevice class represents the button device to the members of a context.
public sealed class ButtonDevice : InputDevice
Properties
Target
public override UIElement Target { get; }
Returns the element that input from this device is sent to.
DeviceType
public override InputManager.InputDeviceType DeviceType { get; }
The input device type for this device.
Methods
Focus(UIElement obj)
public UIElement Focus(UIElement obj)
Focuses the button input on a particular element.
Returns UIElement — Element focused to
IsButtonDown(HardwareButton button)
public bool IsButtonDown(HardwareButton button)
Returns whether or not the specified button is down.
Returns bool
IsButtonUp(HardwareButton button)
public bool IsButtonUp(HardwareButton button)
Returns whether or not the specified button is up.
Returns bool
IsButtonHeld(HardwareButton button)
public bool IsButtonHeld(HardwareButton button)
Returns whether or not the specified button is held.
Returns bool
GetButtonState(HardwareButton button)
public ButtonState GetButtonState(HardwareButton button)
Returns the state of the specified button.
Returns ButtonState