Table of Contents

Class NotificationCard

Namespace
Avalonia.Controls.Notifications
Assembly
Avalonia.Controls.dll

Control that represents and displays a notification.

[PseudoClasses(new string[] { ":error", ":information", ":success", ":warning" })]
public class NotificationCard : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance
NotificationCard
Implements
Inherited Members
Extension Methods

Constructors

NotificationCard()

Initializes a new instance of the NotificationCard class.

public NotificationCard()

Fields

CloseOnClickProperty

Defines the CloseOnClick property.

public static readonly AttachedProperty<bool> CloseOnClickProperty

Field Value

AttachedProperty<bool>

IsClosedProperty

Defines the IsClosed property.

public static readonly StyledProperty<bool> IsClosedProperty

Field Value

StyledProperty<bool>

IsClosingProperty

Defines the IsClosing property.

public static readonly DirectProperty<NotificationCard, bool> IsClosingProperty

Field Value

DirectProperty<NotificationCard, bool>

NotificationClosedEvent

Defines the NotificationClosed event.

public static readonly RoutedEvent<RoutedEventArgs> NotificationClosedEvent

Field Value

RoutedEvent<RoutedEventArgs>

NotificationTypeProperty

Defines the NotificationType property

public static readonly StyledProperty<NotificationType> NotificationTypeProperty

Field Value

StyledProperty<NotificationType>

Properties

IsClosed

Determines if the notification is closed.

public bool IsClosed { get; set; }

Property Value

bool

IsClosing

Determines if the notification is already closing.

public bool IsClosing { get; }

Property Value

bool

NotificationType

Gets or sets the type of the notification

public NotificationType NotificationType { get; set; }

Property Value

NotificationType

Methods

Close()

Closes the NotificationCard.

public void Close()

GetCloseOnClick(Button)

public static bool GetCloseOnClick(Button obj)

Parameters

obj Button

Returns

bool

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e)

Parameters

e AvaloniaPropertyChangedEventArgs

SetCloseOnClick(Button, bool)

public static void SetCloseOnClick(Button obj, bool value)

Parameters

obj Button
value bool

Events

NotificationClosed

Raised when the NotificationCard has closed.

public event EventHandler<RoutedEventArgs>? NotificationClosed

Event Type

EventHandler<RoutedEventArgs>