Class DecoratedText.Types.SwitchControl
Either a toggle-style switch or a checkbox inside a decoratedText
widget.
Google Workspace Add-ons and Chat apps:
Only supported in the decoratedText
widget.
Implements
Namespace: Google.Apps.Card.V1
Assembly: Google.Apps.Card.V1.dll
Syntax
public sealed class DecoratedText.Types.SwitchControl : IMessage<DecoratedText.Types.SwitchControl>, IEquatable<DecoratedText.Types.SwitchControl>, IDeepCloneable<DecoratedText.Types.SwitchControl>, IBufferMessage, IMessage
Constructors
SwitchControl()
Declaration
public SwitchControl()
SwitchControl(SwitchControl)
Declaration
public SwitchControl(DecoratedText.Types.SwitchControl other)
Parameters
Type | Name | Description |
---|---|---|
DecoratedText.Types.SwitchControl | other |
Properties
ControlType
How the switch appears in the user interface.
Declaration
public DecoratedText.Types.SwitchControl.Types.ControlType ControlType { get; set; }
Property Value
Type | Description |
---|---|
DecoratedText.Types.SwitchControl.Types.ControlType |
Name
The name by which the switch widget is identified in a form input event.
For details about working with form inputs, see Receive form data.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
OnChangeAction
The action to perform when the switch state is changed, such as what function to run.
Declaration
public Action OnChangeAction { get; set; }
Property Value
Type | Description |
---|---|
Action |
Selected
When true
, the switch is selected.
Declaration
public bool Selected { get; set; }
Property Value
Type | Description |
---|---|
bool |
Value
The value entered by a user, returned as part of a form input event.
For details about working with form inputs, see Receive form data.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
string |