Skip to main content

Switch Class

Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI

Binary on/off toggle. ValueChanged fires on each flip.

public class Switch : Widget

Constructors​

Switch(Widget parent)​

public Switch(Widget parent)

Create a switch inside parent.

ParameterTypeDescription
parentWidgetContaining widget.

Properties​

IsChecked​

public bool IsChecked { get; set; }

On/off state. Read-back is supported by LVGL.

Returns bool

Events​

ValueChanged​

public event EventHandler ValueChanged

Fires on every flip of Switch.IsChecked from user interaction. Runs on the UI thread.