diff --git a/Enterwell.Clients.Wpf.Notifications.Sample.Net5/App.xaml b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/App.xaml
new file mode 100644
index 0000000..2127810
--- /dev/null
+++ b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/App.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample.Net5/App.xaml.cs b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/App.xaml.cs
new file mode 100644
index 0000000..08dedff
--- /dev/null
+++ b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace Enterwell.Clients.Wpf.Notifications.Sample.Net5
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample.Net5/AssemblyInfo.cs b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample.Net5/Enterwell.Clients.Wpf.Notifications.Sample.Net5.csproj b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/Enterwell.Clients.Wpf.Notifications.Sample.Net5.csproj
new file mode 100644
index 0000000..a5888b1
--- /dev/null
+++ b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/Enterwell.Clients.Wpf.Notifications.Sample.Net5.csproj
@@ -0,0 +1,17 @@
+
+
+
+ WinExe
+ net5.0-windows
+ true
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample.Net5/MainWindow.xaml b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/MainWindow.xaml
new file mode 100644
index 0000000..74651ed
--- /dev/null
+++ b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/MainWindow.xaml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample.Net5/MainWindow.xaml.cs b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/MainWindow.xaml.cs
new file mode 100644
index 0000000..0c19920
--- /dev/null
+++ b/Enterwell.Clients.Wpf.Notifications.Sample.Net5/MainWindow.xaml.cs
@@ -0,0 +1,152 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+
+namespace Enterwell.Clients.Wpf.Notifications.Sample.Net5
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public MainWindow()
+ {
+ this.InitializeComponent();
+ this.DataContext = this;
+ }
+
+ private void ButtonBaseErrorOnClick(object sender, RoutedEventArgs e)
+ {
+ this.Manager
+ .CreateMessage()
+ .Accent("#F15B19")
+ .Background("#F15B19")
+ .HasHeader("Lost connection to server")
+ .HasMessage("Reconnecting...")
+ .WithOverlay(new ProgressBar
+ {
+ VerticalAlignment = VerticalAlignment.Bottom,
+ HorizontalAlignment = HorizontalAlignment.Stretch,
+ Height = 3,
+ BorderThickness = new Thickness(0),
+ Foreground = new SolidColorBrush(Color.FromArgb(128, 255, 255, 255)),
+ Background = Brushes.Transparent,
+ IsIndeterminate = true,
+ IsHitTestVisible = false
+ })
+ .Queue();
+ }
+
+ private void ButtonBaseWarningOnClick(object sender, RoutedEventArgs e)
+ {
+ this.Manager
+ .CreateMessage()
+ .Accent("#E0A030")
+ .Background("#333")
+ .HasBadge("Warn")
+ .HasHeader("Error")
+ .HasMessage("Failed to retrieve data.")
+ .WithButton("Try again", button => { })
+ .Dismiss().WithButton("Ignore", button => { })
+ .Queue();
+ }
+
+ private void ButtonBaseInfoOnClick(object sender, RoutedEventArgs e)
+ {
+ this.Manager
+ .CreateMessage()
+ .Accent("#1751C3")
+ .Background("#333")
+ .HasBadge("Info")
+ .HasMessage("Update will be installed on next application restart.")
+ .Dismiss().WithButton("Update now", button => { })
+ .Dismiss().WithButton("Release notes", button => { })
+ .Dismiss().WithButton("Later", button => { })
+ .Queue();
+ }
+
+ 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.")
+ .Dismiss().WithButton("Update now", button => { })
+ .Dismiss().WithButton("Release notes", button => { })
+ .Dismiss().WithDelay(TimeSpan.FromSeconds(5))
+ .Queue();
+ }
+
+ private void ButtonBaseAdditionalContentOnClick(object sender, RoutedEventArgs e)
+ {
+ this.Manager
+ .CreateMessage()
+ .Accent("#1751C3")
+ .Background("#333")
+ .Foreground("#333")
+ .HasBadge("Info")
+ .HasHeader("Header")
+ .HasMessage("This is the message!")
+ .WithAdditionalContent(ContentLocation.Top, new Border
+ {
+ Height = 25,
+ VerticalAlignment = VerticalAlignment.Stretch,
+ HorizontalAlignment = HorizontalAlignment.Stretch,
+ Background = Brushes.Red
+ })
+ .WithAdditionalContent(ContentLocation.Bottom, new Border
+ {
+ Height = 25,
+ VerticalAlignment = VerticalAlignment.Stretch,
+ HorizontalAlignment = HorizontalAlignment.Stretch,
+ Background = Brushes.Green
+ })
+ .WithAdditionalContent(ContentLocation.Left, new Border
+ {
+ Width = 25,
+ VerticalAlignment = VerticalAlignment.Stretch,
+ HorizontalAlignment = HorizontalAlignment.Stretch,
+ Background = Brushes.Yellow
+ })
+ .WithAdditionalContent(ContentLocation.Right, new Border
+ {
+ Width = 25,
+ VerticalAlignment = VerticalAlignment.Stretch,
+ HorizontalAlignment = HorizontalAlignment.Stretch,
+ Background = Brushes.Violet
+ })
+ .WithAdditionalContent(ContentLocation.Main, new Border
+ {
+ MinHeight = 50,
+ VerticalAlignment = VerticalAlignment.Stretch,
+ HorizontalAlignment = HorizontalAlignment.Stretch,
+ Background = Brushes.Orange
+ })
+ .WithAdditionalContent(ContentLocation.AboveBadge, new Border
+ {
+ Height = 40,
+ Width = 40,
+ Background = Brushes.Indigo
+ })
+ .Dismiss().WithButton("Dismiss", button => { })
+ .Queue();
+ }
+
+ ///
+ /// Gets the notification message manager.
+ ///
+ ///
+ /// The notification message manager.
+ ///
+ public INotificationMessageManager Manager { get; } = new NotificationMessageManager();
+ }
+}
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample/Enterwell.Clients.Wpf.Notifications.Sample.csproj b/Enterwell.Clients.Wpf.Notifications.Sample/Enterwell.Clients.Wpf.Notifications.Sample.csproj
index f30ca15..f52ea95 100644
--- a/Enterwell.Clients.Wpf.Notifications.Sample/Enterwell.Clients.Wpf.Notifications.Sample.csproj
+++ b/Enterwell.Clients.Wpf.Notifications.Sample/Enterwell.Clients.Wpf.Notifications.Sample.csproj
@@ -34,14 +34,8 @@
4
-
- ..\packages\MahApps.Metro.1.4.3\lib\net45\MahApps.Metro.dll
-
-
- ..\packages\MahApps.Metro.1.4.3\lib\net45\System.Windows.Interactivity.dll
-
@@ -91,7 +85,6 @@
ResXFileCodeGenerator
Resources.Designer.cs
-
SettingsSingleFileGenerator
Settings.Designer.cs
@@ -106,5 +99,10 @@
Enterwell.Clients.Wpf.Notifications
+
+
+ 1.4.3
+
+
\ No newline at end of file
diff --git a/Enterwell.Clients.Wpf.Notifications.Sample/packages.config b/Enterwell.Clients.Wpf.Notifications.Sample/packages.config
deleted file mode 100644
index 7777517..0000000
--- a/Enterwell.Clients.Wpf.Notifications.Sample/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Enterwell.Clients.Wpf.Notifications.sln b/Enterwell.Clients.Wpf.Notifications.sln
index c1e9554..0f912c9 100644
--- a/Enterwell.Clients.Wpf.Notifications.sln
+++ b/Enterwell.Clients.Wpf.Notifications.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26206.0
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30709.132
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Enterwell.Clients.Wpf.Notifications", "Enterwell.Clients.Wpf.Notifications\Enterwell.Clients.Wpf.Notifications.csproj", "{CFA27B27-9231-4F6D-804A-C0AE33FA5237}"
EndProject
@@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Readme.md = Readme.md
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Enterwell.Clients.Wpf.Notifications.Sample.Net5", "Enterwell.Clients.Wpf.Notifications.Sample.Net5\Enterwell.Clients.Wpf.Notifications.Sample.Net5.csproj", "{1F1B08F8-6BAA-4805-A703-93242F2DDB4F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +29,10 @@ Global
{4B47659C-0B1D-4273-B03F-D335F9B5E802}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B47659C-0B1D-4273-B03F-D335F9B5E802}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B47659C-0B1D-4273-B03F-D335F9B5E802}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1B08F8-6BAA-4805-A703-93242F2DDB4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1B08F8-6BAA-4805-A703-93242F2DDB4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1B08F8-6BAA-4805-A703-93242F2DDB4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1B08F8-6BAA-4805-A703-93242F2DDB4F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Enterwell.Clients.Wpf.Notifications/Enterwell.Clients.Wpf.Notifications.csproj b/Enterwell.Clients.Wpf.Notifications/Enterwell.Clients.Wpf.Notifications.csproj
index 130cdea..188092d 100644
--- a/Enterwell.Clients.Wpf.Notifications/Enterwell.Clients.Wpf.Notifications.csproj
+++ b/Enterwell.Clients.Wpf.Notifications/Enterwell.Clients.Wpf.Notifications.csproj
@@ -1,94 +1,38 @@
-
-
-
+
- Debug
- AnyCPU
{CFA27B27-9231-4F6D-804A-C0AE33FA5237}
- library
- Enterwell.Clients.Wpf.Notifications
- Enterwell.Clients.Wpf.Notifications
- v4.5.1
- 512
+ net5-windows;netcoreapp3.1;net451
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
+ Enterwell.Clients.Wpf.Notifications
+ Enterwell d.o.o.
+ Enterwell.Clients.Wpf.Notifications
+ Enterwell WPF Notifications library
+ Copyright (c) Enterwell d.o.o. 2017-2020
+ 1.4.2.0
+ 1.4.2.0
+ 1.4.2.0
+ bin\$(Configuration)\
+ true
+ Enterwell d.o.o.
+ https://raw.githubusercontent.com/Enterwell/Wpf.Notifications/master/LICENSE
+ https://github.com/Enterwell/Wpf.Notifications
+ Fixed messages would not dismiss
+ wpf notifications
+ true
- true
full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
+
-
-
-
- 4.0
-
+
-
-
- MSBuild:Compile
- Designer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
\ No newline at end of file
diff --git a/Enterwell.Clients.Wpf.Notifications/Enterwell.Clients.Wpf.Notifications.nuspec b/Enterwell.Clients.Wpf.Notifications/Enterwell.Clients.Wpf.Notifications.nuspec
deleted file mode 100644
index 49989ef..0000000
--- a/Enterwell.Clients.Wpf.Notifications/Enterwell.Clients.Wpf.Notifications.nuspec
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- $id$
- $version$
- $title$
- $author$
- $author$
- https://raw.githubusercontent.com/Enterwell/Wpf.Notifications/master/LICENSE
- https://github.com/Enterwell/Wpf.Notifications
- false
- $description$
- Fixed messages would not dismiss
- Copyright (c) Enterwell d.o.o. 2017-2018
- wpf notifications
-
-
diff --git a/Enterwell.Clients.Wpf.Notifications/Properties/AssemblyInfo.cs b/Enterwell.Clients.Wpf.Notifications/Properties/AssemblyInfo.cs
index 971b935..46c1b0a 100644
--- a/Enterwell.Clients.Wpf.Notifications/Properties/AssemblyInfo.cs
+++ b/Enterwell.Clients.Wpf.Notifications/Properties/AssemblyInfo.cs
@@ -2,18 +2,6 @@
using System.Runtime.InteropServices;
using System.Windows;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Enterwell.Clients.Wpf.Notifications")]
-[assembly: AssemblyDescription("Enterwell WPF Notifications library")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Enterwell d.o.o.")]
-[assembly: AssemblyProduct("Enterwell.Clients.Wpf.Notifications")]
-[assembly: AssemblyCopyright("Copyright © Enterwell d.o.o. 2017-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
@@ -37,17 +25,3 @@
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.4.2.0")]
-[assembly: AssemblyFileVersion("1.4.2.0")]