diff --git a/Src/Examples/CustomNotificationsExample/CustomNotificationsExample.csproj b/Src/Examples/CustomNotificationsExample/CustomNotificationsExample.csproj
index 1f31fa7..4c0ece8 100644
--- a/Src/Examples/CustomNotificationsExample/CustomNotificationsExample.csproj
+++ b/Src/Examples/CustomNotificationsExample/CustomNotificationsExample.csproj
@@ -34,12 +34,15 @@
4
-
- ..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll
+
+ ..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll
+
+
+ ..\..\packages\MahApps.Metro.1.6.5\lib\net45\MahApps.Metro.dll
- ..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll
+ ..\..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll
diff --git a/Src/Examples/CustomNotificationsExample/MainWindow.xaml b/Src/Examples/CustomNotificationsExample/MainWindow.xaml
index aef6a08..601a126 100644
--- a/Src/Examples/CustomNotificationsExample/MainWindow.xaml
+++ b/Src/Examples/CustomNotificationsExample/MainWindow.xaml
@@ -6,13 +6,20 @@
xmlns:local="clr-namespace:CustomNotificationsExample"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
mc:Ignorable="d"
- Title="MainWindow" Height="90" Width="500">
+ Title="MainWindow" Height="600" Width="800">
+
diff --git a/Src/Examples/CustomNotificationsExample/MainWindow.xaml.cs b/Src/Examples/CustomNotificationsExample/MainWindow.xaml.cs
index 1c9d23a..8fb4d51 100644
--- a/Src/Examples/CustomNotificationsExample/MainWindow.xaml.cs
+++ b/Src/Examples/CustomNotificationsExample/MainWindow.xaml.cs
@@ -27,7 +27,7 @@ public MainWindow()
_notifier = new Notifier(cfg =>
{
cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(TimeSpan.FromSeconds(15), MaximumNotificationCount.FromCount(15));
- cfg.PositionProvider = new PrimaryScreenPositionProvider(Corner.BottomRight, 10, 10);
+ cfg.PositionProvider = new WindowPositionProvider(this, Corner.BottomRight, 10, 10);
cfg.KeyboardEventHandler = new AllowedSourcesInputEventHandler(new []{ typeof(CustomInputDisplayPart) });
});
}
@@ -59,5 +59,11 @@ private void MahApps_Click(object sender, RoutedEventArgs e)
_notifier.ShowMahAppsNotification("MahApps notification", "This is custom notification with MahApps styles");
}
+ private void Show_ChildWindow(object sender, RoutedEventArgs e)
+ {
+ var childWindow = new MainWindow();
+ childWindow.ShowActivated = true;
+ childWindow.Show();
+ }
}
}
diff --git a/Src/Examples/CustomNotificationsExample/packages.config b/Src/Examples/CustomNotificationsExample/packages.config
index 087aea0..c444da8 100644
--- a/Src/Examples/CustomNotificationsExample/packages.config
+++ b/Src/Examples/CustomNotificationsExample/packages.config
@@ -1,4 +1,5 @@
-
+
+
\ No newline at end of file
diff --git a/Src/ToastNotifications/Display/NotificationsWindow.xaml.cs b/Src/ToastNotifications/Display/NotificationsWindow.xaml.cs
index f14c358..2a32719 100644
--- a/Src/ToastNotifications/Display/NotificationsWindow.xaml.cs
+++ b/Src/ToastNotifications/Display/NotificationsWindow.xaml.cs
@@ -16,7 +16,7 @@ public partial class NotificationsWindow : Window
{
private IKeyboardEventHandler _keyboardEventHandler;
- public NotificationsWindow()
+ public NotificationsWindow(Window owner)
{
InitializeComponent();
@@ -24,15 +24,6 @@ public NotificationsWindow()
Closing += NotificationsWindow_Closing;
ShowInTaskbar = false;
- Visibility = Visibility.Hidden;
- }
-
- public NotificationsWindow(Window owner)
- {
- InitializeComponent();
-
- Loaded += NotificationsWindow_Loaded;
- Closing += NotificationsWindow_Closing;
Owner = owner;
}