From 27046b2dfcecc0016dd3f7767debd5b6b7957541 Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Sat, 9 Jun 2018 22:30:17 +0200 Subject: [PATCH] Fixed sample, added image --- .../MainWindow.xaml | 31 ---------------- Readme.md | 35 +++++++++++++----- ...reNotificationMessageAdditionalContent.PNG | Bin 0 -> 5465 bytes 3 files changed, 25 insertions(+), 41 deletions(-) create mode 100644 docs/images/CaptureNotificationMessageAdditionalContent.PNG 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 0000000000000000000000000000000000000000..771483105d5a523563693014bc87acdbbc1b6dde GIT binary patch literal 5465 zcmZ`-c|4Te+rN_}TS<8A<*_AEglwgZDEppW_As`LeTgC>(qfFUX5aTIGnVAh5SoM; znnALZZ4_C?`kv|eyzlS#&ucz&&vEW^UFV!@{a#m+v7rt-3qK14LF_kmVWtqo-~+~? z%uL{EWKa_eewdu~bYRc{{gdBT`W(z0^VhY$2SFTN^zR|OUzsbIJQ{SO%7remiB zWM&7Mh!AvY?k4P-dFYqr@fc45k6iq(+CZvXmr`(Xk-;$BMdYz^#5w-N9D4@t;u)6n znU9;!GMNQGVv0jfRQJ|bbDnX%%Y3cuEN>*m^zTtO4vq(9xK8a)@wR4h*oVa6{PGBr z>bDtVqCt#qa~sVh>&B)|Xzmq-taLYguq$mZ?%VCP9n{(FtsQj*t~bHUHrC*X#;>z# z>~S~Ff#L8yCv;w3DK{80({Fq`&%lU1+#-`*RAAWf|!%{Tt}3xg1QdF!SOkN2pH?Z+_Q#w+woEK2Ef3VR`S z#XNbTx7a}#*IPXqp69n^Bzj#NWH)OaHd&$jFE!%)V{qrtNvd#Lk$mjd}(FDyG zw~C8y%cv63hNV#t44dJjm}M2F^QTzm;Wr9R@ECbi%FG(=$OBW+^b=&vdZbq?nkC1p zV|;B(NKZ8Vsj-xK0EJNrNEeQZ!cO;B_^lQ6=~%k96`S^Q76rCs!$digx}Bf(&58-9 z^}T(2-v#9=e|A3TOMMF8<>5dtA&05T+cK8sO{=ul+Zn~@982OcCNexieKr~5-OeTi zKPH)Uvc)@Hu?8pOz?H(C(Y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