diff --git a/Changelog.md b/Changelog.md
index 4fbf7c9..e807daf 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -4,9 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## [1.3.0] - 2018-05-03
+### Added
+- Added notification fade-out and fade-in animations.
+
## [1.2.0] - 2018-04-30
### Added
- - Implemented support for setting custom text color with `Foreground` method.
+- Implemented support for setting custom text color with `Foreground` method.
## [1.1.0] - 2018-04-03
### Added
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml b/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml
index 2845ecb..be81c4d 100644
--- a/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml
+++ b/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml
@@ -82,7 +82,7 @@
VerticalAlignment="Top"
Background="#1751C3"
Click="ButtonBaseInfoDelayOnClick"
- Content="Info message with delayed dismiss (5s)"
+ Content="Animated info message with delayed dismiss (5s)"
Style="{StaticResource NotificationMessageButtonStyle}" />
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml.cs b/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml.cs
index 089c783..5a15e12 100644
--- a/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml.cs
+++ b/Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml.cs
@@ -18,8 +18,7 @@ public partial class MainWindow
///
public MainWindow()
{
- InitializeComponent();
-
+ this.InitializeComponent();
this.DataContext = this;
}
@@ -78,6 +77,9 @@ private void ButtonBaseInfoDelayOnClick(object sender, RoutedEventArgs e)
this.Manager
.CreateMessage()
.Accent("#1751C3")
+ .Animates(true)
+ .AnimationInDuration(0.75)
+ .AnimationOutDuration(2)
.Background("#333")
.HasBadge("Info")
.HasMessage("Update will be installed on next application restart. This message will be dismissed after 5 seconds.")
@@ -87,6 +89,12 @@ private void ButtonBaseInfoDelayOnClick(object sender, RoutedEventArgs e)
.Queue();
}
+ ///
+ /// Gets the notification message manager.
+ ///
+ ///
+ /// The notification message manager.
+ ///
public INotificationMessageManager Manager { get; } = new NotificationMessageManager();
}
}
diff --git a/Enterwell.Clients.Wpf.Notifications/Controls/NotificationMessage.cs b/Enterwell.Clients.Wpf.Notifications/Controls/NotificationMessage.cs
index 8a44d21..85dfba6 100644
--- a/Enterwell.Clients.Wpf.Notifications/Controls/NotificationMessage.cs
+++ b/Enterwell.Clients.Wpf.Notifications/Controls/NotificationMessage.cs
@@ -3,6 +3,7 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
+using System.Windows.Media.Animation;
namespace Enterwell.Clients.Wpf.Notifications.Controls
{
@@ -11,7 +12,7 @@ namespace Enterwell.Clients.Wpf.Notifications.Controls
///
///
///
- public class NotificationMessage : Control, INotificationMessage
+ public class NotificationMessage : Control, INotificationMessage, INotificationAnimation
{
///
/// Gets or sets the content of the overlay.
@@ -145,6 +146,133 @@ public ObservableCollection