How the notification system components work together
masterThe notification system is composed of several key parts:
NotificationMessage: The primary UI control representing a single notification. It consists of a badge (left), a message (center), and buttons (right).NotificationMessageButton: A button control used for user interaction within a notification.NotificationMessageFactory: A factory used to instantiate the controls.NotificationMessageManager: The central manager responsible for queueing and dismissing notifications. It uses the factory to create messages.NotificationMessageContainer: A UI control that must be placed in your application's view (e.g., the Main Window). It is assigned aNotificationMessageManagerand handles the visual stack and lifecycle of all queued notifications.
To use the system, place a NotificationMessageContainer in your XAML and bind its Manager property to an instance of NotificationMessageManager (provided via DI, ViewModel, or code-behind).
// In code-behind
this.Manager = new NotificationMessageManager();
// In XAML
<controls:NotificationMessageContainer Manager="{Binding Manager}" />