mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-20 09:45:39 -05:00
FIX ToolTipText changes update an existing wrapper ToolTip, if there is already one.
NTFY-23 git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@195 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
@@ -298,10 +298,20 @@ namespace Hardcodet.Wpf.TaskbarNotification
|
||||
/// <param name="e">Provides information about the updated property.</param>
|
||||
private void OnToolTipTextPropertyChanged(DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
//only recreate tooltip if we're not using a custom control
|
||||
if (TrayToolTipResolved == null || TrayToolTipResolved.Content is string)
|
||||
//do not touch tooltips if we have a custom tooltip element
|
||||
if (TrayToolTip == null)
|
||||
{
|
||||
CreateCustomToolTip();
|
||||
ToolTip currentToolTip = TrayToolTipResolved;
|
||||
if (currentToolTip == null)
|
||||
{
|
||||
//if we don't have a wrapper tooltip for the tooltip text, create it now
|
||||
CreateCustomToolTip();
|
||||
}
|
||||
else
|
||||
{
|
||||
//if we have a wrapper tooltip that shows the old tooltip text, just update content
|
||||
currentToolTip.Content = e.NewValue;
|
||||
}
|
||||
}
|
||||
|
||||
WriteToolTipSettings();
|
||||
|
||||
Reference in New Issue
Block a user