mirror of
https://gitee.com/handyorg/HandyControl.git
synced 2024-11-30 02:48:03 +08:00
fixed #476
This commit is contained in:
parent
0ec7532ad0
commit
d1f6b5f7a0
@ -270,6 +270,11 @@ namespace HandyControl.Controls
|
||||
var ctl = (NotifyIcon)d;
|
||||
ctl._icon = (ImageSource)e.NewValue;
|
||||
ctl.OnIconChanged();
|
||||
|
||||
if (!string.IsNullOrEmpty(ctl._windowClassName) && !ctl.IsBlink && ctl.Visibility == Visibility.Visible)
|
||||
{
|
||||
ctl.UpdateIcon(true);
|
||||
}
|
||||
}
|
||||
|
||||
public ImageSource Icon
|
||||
@ -491,6 +496,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private void OnIconChanged()
|
||||
{
|
||||
if (_windowClassName == null) return;
|
||||
|
||||
if (_icon != null)
|
||||
{
|
||||
IconHelper.GetIconHandlesFromImageSource(_icon, out _, out _iconHandle);
|
||||
|
Loading…
Reference in New Issue
Block a user