diff --git a/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml b/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml index ff265ba..6478fbc 100644 --- a/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml +++ b/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml @@ -101,34 +101,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Readme.md b/Readme.md index a7d1465..9ee681f 100644 --- a/Readme.md +++ b/Readme.md @@ -118,21 +118,36 @@ The `WithOverlay` allows you to set custom overlay content. In this example a pr ### Custom additional content for notification +![Notification message with additional content - checkbox at the bottom](docs/images/CaptureNotificationMessageAdditionalContent.PNG) + ```c# manager.CreateMessage() - .Accent("#F15B19") - .Background("#F15B19") - .HasHeader("Lost connection to server") - .HasMessage("Reconnecting...") - .WithAdditionalContent(ContentLocation.Main, new CheckBox - { - Margin = new Thickness(16), - HorizontalAlignment = HorizontalAlignment.Right, - Content = "Don't show again" - }) + .Accent("#1751C3") + .Background("#333") + .HasBadge("Info") + .HasHeader("Update available") + .HasMessage("Update will be installed on next application restart.") + .Dismiss().WithButton("Update now", button => { }) + .Dismiss().WithButton("Later", button => { }) + .WithAdditionalContent(ContentLocation.Bottom, + new Border + { + BorderThickness = new Thickness(0,1,0,0), + BorderBrush = new SolidColorBrush(Color.FromArgb(128, 28, 28, 28)), + Child = new CheckBox + { + Margin = new Thickness(12, 8, 12, 8), + HorizontalAlignment = HorizontalAlignment.Left, + Content = "Don't show again" + } + }) .Queue(); ``` +In this example a custom "Don't show again" checkbox is located at the bottom of the message. + +You can add additional content to following locations: `Top, Bottom, Left, Right, Main, AboveBadge`. + ### Multiple notification The `NotificationMessageContainer` has build-in support for showing multiple notifications at the same time. New notifications will show at the bottom of the message stack. diff --git a/docs/images/CaptureNotificationMessageAdditionalContent.PNG b/docs/images/CaptureNotificationMessageAdditionalContent.PNG new file mode 100644 index 0000000..7714831 Binary files /dev/null and b/docs/images/CaptureNotificationMessageAdditionalContent.PNG differ