Growl can now be used in threads

This commit is contained in:
NaBian committed 2019-02-22 16:58:34 +08:00
1 parent 36008d83e2
commit b8692d080f
2 files changed
+6

No files matched your search

+3
View File
@@ -260,6 +260,8 @@ namespace HandyControl.Controls
/// </summary>
/// <param name="growlInfo"></param>
private static void Show(GrowlInfo growlInfo)
{
Application.Current.Dispatcher.Invoke(() =>
{
var ctl = new Growl
{
@@ -277,6 +279,7 @@ namespace HandyControl.Controls
_waitTime = Math.Max(growlInfo.WaitTime, 2)
};
GrowlPanel.Children.Insert(0, ctl);
});
}
/// <summary>
@@ -260,6 +260,8 @@ namespace HandyControl.Controls
/// </summary>
/// <param name="growlInfo"></param>
private static void Show(GrowlInfo growlInfo)
{
Application.Current.Dispatcher.Invoke(new Action(() =>
{
var ctl = new Growl
{
@@ -277,6 +279,7 @@ namespace HandyControl.Controls
_waitTime = Math.Max(growlInfo.WaitTime, 2)
};
GrowlPanel.Children.Insert(0, ctl);
}));
}
/// <summary>