diff --git a/Source/NotifyIconWpf/TaskbarIcon.Declarations.cs b/Source/NotifyIconWpf/TaskbarIcon.Declarations.cs index 4b72aeb..56bd376 100644 --- a/Source/NotifyIconWpf/TaskbarIcon.Declarations.cs +++ b/Source/NotifyIconWpf/TaskbarIcon.Declarations.cs @@ -380,15 +380,13 @@ namespace Hardcodet.Wpf.TaskbarNotification //remove the taskbar icon reference from the previously used element SetParentTaskbarIcon((DependencyObject) e.OldValue, null); } - - + if (e.NewValue != null) { //set this taskbar icon as a reference to the new tooltip element SetParentTaskbarIcon((DependencyObject) e.NewValue, this); } - - + //update tooltip settings - needed to make sure a string is set, even //if the ToolTipText property is not set. Otherwise, the event that //triggers tooltip display is never fired.