Class SheetAction
An action of an ActionSheetViewModel: it runs, or offers Choices such as report reasons.
Implements
Inherited Members
Namespace: Uniform.Chat.Avalonia.ViewModels
Assembly: Uniform.Chat.Avalonia.dll
Syntax
public sealed record SheetAction : IEquatable<SheetAction>
Constructors
| Edit this page View SourceSheetAction(string, Action?, IReadOnlyList<SheetAction>?, bool)
An action of an ActionSheetViewModel: it runs, or offers Choices such as report reasons.
Declaration
public SheetAction(string Label, Action? Run, IReadOnlyList<SheetAction>? Choices = null, bool IsDanger = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | Label | What the action says, e.g. |
| Action | Run | What it does, or null when it only offers choices. |
| IReadOnlyList<SheetAction> | Choices | Actions to choose from instead, or null. |
| bool | IsDanger | Whether it removes or blocks something, and is shown in red. |
Properties
| Edit this page View SourceChoices
Actions to choose from instead, or null.
Declaration
public IReadOnlyList<SheetAction>? Choices { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<SheetAction> |
HasChoices
Whether it offers choices instead of running.
Declaration
public bool HasChoices { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsDanger
Whether it removes or blocks something, and is shown in red.
Declaration
public bool IsDanger { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
Label
What the action says, e.g. Reply.
Declaration
public string Label { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Run
What it does, or null when it only offers choices.
Declaration
public Action? Run { get; init; }
Property Value
| Type | Description |
|---|---|
| Action |