Skip to content

ToggleSwitchExtensions

Namespace: Hex1b

Assembly: Hex1b.dll

Extension methods for creating ToggleSwitchWidget.

csharp
public static class ToggleSwitchExtensions

Inheritance

ObjectToggleSwitchExtensions

Methods

ToggleSwitch<TParent>(WidgetContext<TParent>, IReadOnlyList<string>, int)

Creates a ToggleSwitchWidget with the provided options.

Parameters:

  • ctx (WidgetContext<<TParent>>): The widget context.
  • options (IReadOnlyList<String>): The available options for the toggle switch.
  • selectedIndex (Int32): The initial selected option index (default is 0).

Returns: ToggleSwitchWidget

A new ToggleSwitchWidget.

csharp
public static ToggleSwitchWidget ToggleSwitch<TParent>(this WidgetContext<TParent> ctx, IReadOnlyList<string> options, int selectedIndex = 0) where TParent : Hex1bWidget

Released under the MIT License.