Class DecoratedText
A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. For an example in Google Chat apps, see Display text with decorative text.
Implements
Namespace: Google.Apps.Card.V1
Assembly: Google.Apps.Card.V1.dll
Syntax
public sealed class DecoratedText : IMessage<DecoratedText>, IEquatable<DecoratedText>, IDeepCloneable<DecoratedText>, IBufferMessage, IMessage
Constructors
DecoratedText()
Declaration
public DecoratedText()
DecoratedText(DecoratedText)
Declaration
public DecoratedText(DecoratedText other)
Parameters
| Type | Name | Description |
|---|---|---|
| DecoratedText | other |
Properties
BottomLabel
The text that appears below text. Always wraps.
Declaration
public string BottomLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
BottomLabelText
TextParagraph equivalent of bottom_label. Always wraps. Allows for
more complex formatting than bottom_label.
Declaration
public TextParagraph BottomLabelText { get; set; }
Property Value
| Type | Description |
|---|---|
| TextParagraph |
Button
A button that a user can click to trigger an action.
Declaration
public Button Button { get; set; }
Property Value
| Type | Description |
|---|---|
| Button |
ContentText
TextParagraph equivalent of text. Allows for more complex formatting
than text.
Declaration
public TextParagraph ContentText { get; set; }
Property Value
| Type | Description |
|---|---|
| TextParagraph |
ControlCase
Declaration
public DecoratedText.ControlOneofCase ControlCase { get; }
Property Value
| Type | Description |
|---|---|
| DecoratedText.ControlOneofCase |
EndIcon
Declaration
public Icon EndIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| Icon |
Icon
Deprecated in favor of startIcon.
Declaration
[Obsolete]
public Icon Icon { get; set; }
Property Value
| Type | Description |
|---|---|
| Icon |
OnClick
This action is triggered when users click topLabel or bottomLabel.
Declaration
public OnClick OnClick { get; set; }
Property Value
| Type | Description |
|---|---|
| OnClick |
StartIcon
The icon displayed in front of the text.
Declaration
public Icon StartIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| Icon |
StartIconVerticalAlignment
Optional. Vertical alignment of the start icon. If not set, the icon will be vertically centered.
Declaration
public Widget.Types.VerticalAlignment StartIconVerticalAlignment { get; set; }
Property Value
| Type | Description |
|---|---|
| Widget.Types.VerticalAlignment |
SwitchControl
A switch widget that a user can click to change its state and trigger an action.
Declaration
public DecoratedText.Types.SwitchControl SwitchControl { get; set; }
Property Value
| Type | Description |
|---|---|
| DecoratedText.Types.SwitchControl |
Text
Required. The primary text.
Supports simple formatting. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace add-ons.
Declaration
public string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TopLabel
The text that appears above text. Always truncates.
Declaration
public string TopLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TopLabelText
TextParagraph equivalent of top_label. Always truncates. Allows for
more complex formatting than top_label.
Declaration
public TextParagraph TopLabelText { get; set; }
Property Value
| Type | Description |
|---|---|
| TextParagraph |
WrapText
The wrap text setting. If true, the text wraps and displays on
multiple lines. Otherwise, the text is truncated.
Only applies to text, not topLabel and bottomLabel.
Declaration
public bool WrapText { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |