layout: default title: ActionToggle parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components

ActionToggle Class

A customizable toggle used in the LayerList widget that performs a specific action(s) which can be toggled on/off.

public class ActionToggle : dymaptic.GeoBlazor.Core.Components.ActionBase

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 ActionBase 🡒 ActionToggle

Constructors

ActionToggle() Constructor

Parameterless constructor for use as a razor component.

public ActionToggle();

ActionToggle(string, string, Func, Nullable, Nullable, Nullable, Nullable) Constructor

Constructor for use in code.

public ActionToggle(string? title=null, string? id=null, System.Func<System.Threading.Tasks.Task>? callbackFunction=null, System.Nullable<bool> value=null, System.Nullable<bool> active=null, System.Nullable<bool> disabled=null, System.Nullable<bool> visible=null);

Parameters

title System.String

The title of the action.

id System.String

The name of the ID assigned to this action.

callbackFunction System.Func<System.Threading.Tasks.Task>

The action function to perform on click.

value System.Nullable<System.Boolean>

Indicates the value of whether the action is toggled on/off.

active System.Nullable<System.Boolean>

Set this property to true to display a spinner icon.

disabled System.Nullable<System.Boolean>

Indicates whether this action is disabled.

visible System.Nullable<System.Boolean>

Indicates if the action is visible.

Properties

ActionToggle.Type Property

Specifies the type of action. Choose between “button” or “toggle”.

public override string Type { get; }

Property Value

System.String

ActionToggle.Value Property

Indicates the value of whether the action is toggled on/off.

public System.Nullable<bool> Value { get; set; }

Property Value

System.Nullable<System.Boolean>