fixed #476
This commit is contained in:
1 parent
0ec7532ad0
commit
d1f6b5f7a0
1 file changed
+7
@@ -270,6 +270,11 @@ namespace HandyControl.Controls
|
|||||||
var ctl = (NotifyIcon)d;
|
var ctl = (NotifyIcon)d;
|
||||||
ctl._icon = (ImageSource)e.NewValue;
|
ctl._icon = (ImageSource)e.NewValue;
|
||||||
ctl.OnIconChanged();
|
ctl.OnIconChanged();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(ctl._windowClassName) && !ctl.IsBlink && ctl.Visibility == Visibility.Visible)
|
||||||
|
{
|
||||||
|
ctl.UpdateIcon(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageSource Icon
|
public ImageSource Icon
|
||||||
@@ -491,6 +496,8 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private void OnIconChanged()
|
private void OnIconChanged()
|
||||||
{
|
{
|
||||||
|
if (_windowClassName == null) return;
|
||||||
|
|
||||||
if (_icon != null)
|
if (_icon != null)
|
||||||
{
|
{
|
||||||
IconHelper.GetIconHandlesFromImageSource(_icon, out _, out _iconHandle);
|
IconHelper.GetIconHandlesFromImageSource(_icon, out _, out _iconHandle);
|
||||||
|
|||||||
Reference in new issue
Block a user