Class NotificationButtonBuilder
Represents a builder that can be used to create buttons inside notifications.
Namespace: Artemis.UI.Shared.Services.Builders
Assembly: Artemis.UI.Shared.dll
Syntax
public class NotificationButtonBuilder
Constructors
NotificationButtonBuilder()
Declaration
public NotificationButtonBuilder()
Methods
WithAction(Action)
Changes action that is called when the button is clicked.
Declaration
public NotificationButtonBuilder WithAction(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | The action to call when the button is clicked. |
Returns
Type | Description |
---|---|
NotificationButtonBuilder | The builder that can be used to further build the button. |
WithAction(Func<Task>)
Changes action that is called when the button is clicked.
Declaration
public NotificationButtonBuilder WithAction(Func<Task> action)
Parameters
Type | Name | Description |
---|---|---|
Func<Task> | action | The action to call when the button is clicked. |
Returns
Type | Description |
---|---|
NotificationButtonBuilder | The builder that can be used to further build the button. |
WithCommand(ICommand)
Changes command that is called when the button is clicked.
Declaration
public NotificationButtonBuilder WithCommand(ICommand command)
Parameters
Type | Name | Description |
---|---|---|
ICommand | command | The command to call when the button is clicked. |
Returns
Type | Description |
---|---|
NotificationButtonBuilder | The builder that can be used to further build the button. |
WithCommandParameter(object?)
Changes parameter of the command that is called when the button is clicked.
Declaration
public NotificationButtonBuilder WithCommandParameter(object? commandParameter)
Parameters
Type | Name | Description |
---|---|---|
object | commandParameter | The parameter of the command to call when the button is clicked. |
Returns
Type | Description |
---|---|
NotificationButtonBuilder | The builder that can be used to further build the button. |
WithText(string)
Changes text message of the button.
Declaration
public NotificationButtonBuilder WithText(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The new text. |
Returns
Type | Description |
---|---|
NotificationButtonBuilder | The notification builder that can be used to further build the button. |