Table of Contents

Class NotificationBuilder

Namespace
Artemis.UI.Shared.Services.Builders
Assembly
Artemis.UI.Shared.dll

Represents a builder that can be used to create notifications.

public class NotificationBuilder
Inheritance
object
NotificationBuilder

Constructors

NotificationBuilder(Window)

Creates a new instance of the NotificationBuilder class.

public NotificationBuilder(Window parent)

Parameters

parent Window

The parent window that will host the notification.

Methods

HavingButton(Action<NotificationButtonBuilder>)

Changes the action button of the notification.

public NotificationBuilder HavingButton(Action<NotificationButtonBuilder> configure)

Parameters

configure Action<NotificationButtonBuilder>

An action to configure the button.

Returns

NotificationBuilder

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

Show()

Shows the notification.

public Action Show()

Returns

Action

An action that can be called to hide the notification.

Exceptions

ArtemisSharedUIException

WithHorizontalPosition(HorizontalAlignment)

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

public NotificationBuilder WithHorizontalPosition(HorizontalAlignment position)

Parameters

position HorizontalAlignment

The horizontal position of the notification inside the parent window.

Returns

NotificationBuilder

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

WithMessage(string?)

Changes the message of the notification.

public NotificationBuilder WithMessage(string? content)

Parameters

content string

The new message.

Returns

NotificationBuilder

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

WithSeverity(NotificationSeverity)

Changes the severity (color) of the notification.

public NotificationBuilder WithSeverity(NotificationSeverity severity)

Parameters

severity NotificationSeverity

The severity (color) of the notification.

Returns

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.

public NotificationBuilder WithTimeout(TimeSpan timeout)

Parameters

timeout TimeSpan

The timeout of the notification after which it disappears automatically.

Returns

NotificationBuilder

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

WithTitle(string?)

Changes the title of the notification.

public NotificationBuilder WithTitle(string? title)

Parameters

title string

The new title.

Returns

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.

public NotificationBuilder WithVerticalPosition(VerticalAlignment position)

Parameters

position VerticalAlignment

The vertical position of the notification inside the parent window.

Returns

NotificationBuilder

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