fixed an issue where resources could not be found in growl & messagebox
This commit is contained in:
1 parent
2aff85c4e2
commit
7c0a551d69
6 files changed
+24
-11
No files matched your search
@@ -372,8 +372,8 @@ namespace HandyControl.Controls
|
||||
{
|
||||
Message = growlInfo.Message,
|
||||
Time = DateTime.Now,
|
||||
Icon = ResourceHelper.GetResourceInternal<Geometry>(growlInfo.IconKey),
|
||||
IconBrush = ResourceHelper.GetResourceInternal<Brush>(growlInfo.IconBrushKey),
|
||||
Icon = ResourceHelper.GetResource<Geometry>(growlInfo.IconKey) ?? growlInfo.Icon,
|
||||
IconBrush = ResourceHelper.GetResource<Brush>(growlInfo.IconBrushKey) ?? growlInfo.IconBrush,
|
||||
_showCloseButton = growlInfo.ShowCloseButton,
|
||||
ActionBeforeClose = growlInfo.ActionBeforeClose,
|
||||
_staysOpen = growlInfo.StaysOpen,
|
||||
@@ -408,8 +408,8 @@ namespace HandyControl.Controls
|
||||
{
|
||||
Message = growlInfo.Message,
|
||||
Time = DateTime.Now,
|
||||
Icon = ResourceHelper.GetResourceInternal<Geometry>(growlInfo.IconKey),
|
||||
IconBrush = ResourceHelper.GetResourceInternal<Brush>(growlInfo.IconBrushKey),
|
||||
Icon = ResourceHelper.GetResource<Geometry>(growlInfo.IconKey) ?? growlInfo.Icon,
|
||||
IconBrush = ResourceHelper.GetResource<Brush>(growlInfo.IconBrushKey) ?? growlInfo.IconBrush,
|
||||
_showCloseButton = growlInfo.ShowCloseButton,
|
||||
ActionBeforeClose = growlInfo.ActionBeforeClose,
|
||||
_staysOpen = growlInfo.StaysOpen,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
@@ -45,7 +46,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
Stretch = Stretch.UniformToFill
|
||||
}
|
||||
: ResourceHelper.GetResourceInternal<Brush>("SecondaryRegionBrush");
|
||||
: ResourceHelper.GetResourceInternal<Brush>(ResourceToken.SecondaryRegionBrush);
|
||||
}
|
||||
|
||||
public ImageSource Source
|
||||
|
||||
@@ -375,13 +375,13 @@ namespace HandyControl.Controls
|
||||
if (!string.IsNullOrEmpty(info.IconKey))
|
||||
{
|
||||
messageBox.ShowImage = true;
|
||||
messageBox.Image = ResourceHelper.GetResourceInternal<Geometry>(info.IconKey);
|
||||
messageBox.ImageBrush = ResourceHelper.GetResourceInternal<Brush>(info.IconBrushKey);
|
||||
messageBox.Image = ResourceHelper.GetResource<Geometry>(info.IconKey) ?? info.Icon;
|
||||
messageBox.ImageBrush = ResourceHelper.GetResource<Brush>(info.IconBrushKey) ?? info.IconBrush;
|
||||
}
|
||||
|
||||
if (info.StyleKey != null)
|
||||
{
|
||||
messageBox.Style = ResourceHelper.GetResourceInternal<Style>(info.StyleKey);
|
||||
messageBox.Style = ResourceHelper.GetResource<Style>(info.StyleKey) ?? info.Style;
|
||||
}
|
||||
SystemSounds.Asterisk.Play();
|
||||
messageBox.ShowDialog();
|
||||
|
||||
Reference in new issue
Block a user