Artemis Artemis
Artemis Artemis

Search Results for

    Class NotificationBuilder

    Represents a builder that can be used to create notifications.

    Inheritance
    object
    NotificationBuilder
    Namespace: Artemis.UI.Shared.Services.Builders
    Assembly: Artemis.UI.Shared.dll
    Syntax
    public class NotificationBuilder

    Constructors

    NotificationBuilder(Window)

    Creates a new instance of the NotificationBuilder class.

    Declaration
    public NotificationBuilder(Window parent)
    Parameters
    Type Name Description
    Window parent

    The parent window that will host the notification.

    Methods

    HavingButton(Action<NotificationButtonBuilder>)

    Changes the action button of the notification.

    Declaration
    public NotificationBuilder HavingButton(Action<NotificationButtonBuilder> configure)
    Parameters
    Type Name Description
    Action<NotificationButtonBuilder> configure

    An action to configure the button.

    Returns
    Type Description
    NotificationBuilder

    The notification builder that can be used to further build the notification.

    Show()

    Shows the notification.

    Declaration
    public Action Show()
    Returns
    Type Description
    Action

    An action that can be called to hide the notification.

    Exceptions
    Type Condition
    ArtemisSharedUIException

    WithHorizontalPosition(HorizontalAlignment)

    Changes the horizontal position of the notification inside the parent window.

    Declaration
    public NotificationBuilder WithHorizontalPosition(HorizontalAlignment position)
    Parameters
    Type Name Description
    HorizontalAlignment position

    The horizontal position of the notification inside the parent window.

    Returns
    Type Description
    NotificationBuilder

    The notification builder that can be used to further build the notification.

    WithMessage(string?)

    Changes the message of the notification.

    Declaration
    public NotificationBuilder WithMessage(string? content)
    Parameters
    Type Name Description
    string content

    The new message.

    Returns
    Type Description
    NotificationBuilder

    The notification builder that can be used to further build the notification.

    WithSeverity(NotificationSeverity)

    Changes the severity (color) of the notification.

    Declaration
    public NotificationBuilder WithSeverity(NotificationSeverity severity)
    Parameters
    Type Name Description
    NotificationSeverity severity

    The severity (color) of the notification.

    Returns
    Type Description
    NotificationBuilder

    The notification builder that can be used to further build the notification.

    WithTimeout(TimeSpan)

    Changes the timeout of the notification after which it disappears automatically.

    Declaration
    public NotificationBuilder WithTimeout(TimeSpan timeout)
    Parameters
    Type Name Description
    TimeSpan timeout

    The timeout of the notification after which it disappears automatically.

    Returns
    Type Description
    NotificationBuilder

    The notification builder that can be used to further build the notification.

    WithTitle(string?)

    Changes the title of the notification.

    Declaration
    public NotificationBuilder WithTitle(string? title)
    Parameters
    Type Name Description
    string title

    The new title.

    Returns
    Type Description
    NotificationBuilder

    The notification builder that can be used to further build the notification.

    WithVerticalPosition(VerticalAlignment)

    Changes the vertical position of the notification inside the parent window.

    Declaration
    public NotificationBuilder WithVerticalPosition(VerticalAlignment position)
    Parameters
    Type Name Description
    VerticalAlignment position

    The vertical position of the notification inside the parent window.

    Returns
    Type Description
    NotificationBuilder

    The notification builder that can be used to further build the notification.

    Content is available under the PolyForm Noncommercial License, by Artemis RGB.