Buttons Class
NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Input
The Button class represents the button device to the members of a context.
public sealed class Buttons
Properties
FocusedElement
public static UIElement FocusedElement { get; }
Returns the element that the button is focused on.
PrimaryDevice
public static ButtonDevice PrimaryDevice { get; }
The primary button device.
Methods
RoutedEvent( , RoutingStrategy.Tunnel, typeof(ButtonEventHandler))
public static readonly RoutedEvent PreviewButtonDownEvent = new RoutedEvent( , RoutingStrategy.Tunnel, typeof(ButtonEventHandler))
PreviewButtonDown
Returns RoutedEvent PreviewButtonDownEvent = new
RoutedEvent( , RoutingStrategy.Tunnel, typeof(ButtonEventHandler))
public static readonly RoutedEvent PreviewButtonUpEvent = new RoutedEvent( , RoutingStrategy.Tunnel, typeof(ButtonEventHandler))
PreviewButtonUp
Returns RoutedEvent PreviewButtonUpEvent = new
RoutedEvent( , RoutingStrategy.Bubble, typeof(ButtonEventHandler))
public static readonly RoutedEvent ButtonDownEvent = new RoutedEvent( , RoutingStrategy.Bubble, typeof(ButtonEventHandler))
ButtonDown
Returns RoutedEvent ButtonDownEvent = new
RoutedEvent( , RoutingStrategy.Bubble, typeof(ButtonEventHandler))
public static readonly RoutedEvent ButtonUpEvent = new RoutedEvent( , RoutingStrategy.Bubble, typeof(ButtonEventHandler))
ButtonUp
Returns RoutedEvent ButtonUpEvent = new
RoutedEvent( , RoutingStrategy.Bubble, typeof(FocusChangedEventHandler))
public static readonly RoutedEvent GotFocusEvent = new RoutedEvent( , RoutingStrategy.Bubble, typeof(FocusChangedEventHandler))
GotFocus
Returns RoutedEvent GotFocusEvent = new
RoutedEvent( , RoutingStrategy.Bubble, typeof(FocusChangedEventHandler))
public static readonly RoutedEvent LostFocusEvent = new RoutedEvent( , RoutingStrategy.Bubble, typeof(FocusChangedEventHandler))
LostFocus
Returns RoutedEvent LostFocusEvent = new
Focus(UIElement element)
public static UIElement Focus(UIElement element)
Focuses the button on a particular element.
| Parameter | Type | Description |
|---|---|---|
element | UIElement | The element to focus the button on. |
Returns UIElement
IsButtonDown(HardwareButton button)
public static bool IsButtonDown(HardwareButton button)
Returns whether or not the specified button is down.
Returns bool
IsButtonUp(HardwareButton button)
public static bool IsButtonUp(HardwareButton button)
Returns whether or not the specified button is up.
Returns bool
IsButtonHeld(HardwareButton button)
public static bool IsButtonHeld(HardwareButton button)
Returns whether or not the specified button is held.
Returns bool
GetButtonState(HardwareButton button)
public static ButtonState GetButtonState(HardwareButton button)
Returns the state of the specified button.
Returns ButtonState