Skip to main content

Interface IButton

Interface describing button classes.

Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface IButton : ISensor<bool>, ISensor

Properties

LongClickedThreshold

The minimum duration for a long press.

View Source
Declaration
TimeSpan LongClickedThreshold { get; set; }

State

Returns the current raw state of the switch. If the switch is pressed (connected), returns true, otherwise false.

View Source
Declaration
bool State { get; }

Events

PressStarted

Raised when a press starts (the button is pushed down; circuit is closed).

View Source
Declaration
event EventHandler PressStarted
Event Type

System.EventHandler

PressEnded

Raised when a press ends (the button is released; circuit is opened).

View Source
Declaration
event EventHandler PressEnded
Event Type

System.EventHandler

Clicked

Raised when the button circuit is re-opened after it has been closed (at the end of a “press”.

View Source
Declaration
event EventHandler Clicked
Event Type

System.EventHandler

LongClicked

Raised when the button circuit is pressed for at least LongClickedThreshold.

View Source
Declaration
event EventHandler LongClicked
Event Type

System.EventHandler