Should tooltips disappear when clicking?

Topics: question
Feb 9, 2011 at 8:16 AM

When comparing the silverlight.controls.tooltips to the orignial tooltipservice included in silverlight, it seems like there is a difference in behavior

When using the built-in and clicking on an object where the tooltip is visible will remove the tooltip. This seems not to be the case with Silverlight Advanced Tooltips.

Any workarounds to get the same behavior with Silverlight Advanced Tooltips.

 

My problem: When dragging an object with a tooltip associated the tooltip stays open and remains in the original position of the object until the dragging is done. And the tooltip overlaps my rightclick/left-click menues as well.

Coordinator
Feb 13, 2011 at 4:06 PM

Hi,

thanks for reporting this issue!

 

I've built-in this functionality in the latest sources, which you can download and test in your application.

The fixed behavior will be available in the next release of the library.

 

Cheers,

Xavier

Coordinator
Feb 13, 2011 at 4:07 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Feb 14, 2011 at 9:16 AM

Excellent. I have tried it, and it looks good.

My issue with dragging is still not quite there though. The nature of my dragging behavior needs to set Handled=True when clicking on an object. That means that the tooltip actually stays active when I'm dragging. Could a method be exposed that allows me to do the same as the RootVisual MouseDown event I could try to use when dragging?

Coordinator
Feb 14, 2011 at 7:26 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Feb 14, 2011 at 9:59 PM

Hi,

the latest sources provide you probably with what you need.

A new ToolTipService.CloseCurrentToolTip(bool skipCloseAnimation = false) is available now.

Hope that helps!

Cheers,

Xavier

Feb 15, 2011 at 6:56 AM

Nice! That was actually pretty much what I did in my version of the code. Thanks.

Coordinator
Feb 15, 2011 at 7:23 AM

Your welcome!

Was it sufficient to fix your issue?

 

Cheers,

Xavier

Feb 15, 2011 at 8:23 AM

I need to test some more without my own workarounds but I think so, yes. Any plans on when the next release is up?

Coordinator
Feb 15, 2011 at 9:01 AM
I hope next weekend to get a fresh release out.
I'd like to do some more testing and add some diagnostics first.

Cheers,
Xavier

2011/2/15 svrist <notifications@codeplex.com>

From: svrist

I need to test some more without my own workarounds but I think so, yes. Any plans on when the next release is up?

Read the full discussion online.

To add a post to this discussion, reply to this email (tooltipservice@discussions.codeplex.com)

To start a new discussion for this project, email tooltipservice@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Feb 18, 2011 at 1:56 PM

For it to work satisfiably for me I had to add this patch:

Index: Dev/Silverlight.Controls.ToolTips/ToolTipService.cs
===================================================================
--- Dev/Silverlight.Controls.ToolTips/ToolTipService.cs	(revision 58106)
+++ Dev/Silverlight.Controls.ToolTips/ToolTipService.cs	(working copy)
@@ -314,6 +314,10 @@
                             CurrentToolTip.CloseAnimation.Begin();
                         else CurrentToolTip.IsOpen = false;
                     }
+
+                    var toolTipTimer = CurrentToolTip.Timer;
+                    if (toolTipTimer != null)
+                        toolTipTimer.StopAndReset();
                 }
             }
         }

Otherwise the tooltip will reappear after $InitialDelay again.

Coordinator
Feb 20, 2011 at 11:26 AM
Makes sense!
Thanks, I've added it to the latest sources.

Cheers,
Xavier

2011/2/18 svrist <notifications@codeplex.com>

From: svrist

For it to work satisfiably for me I had to add this patch:

Index: Dev/Silverlight.Controls.ToolTips/ToolTipService.cs
===================================================================
--- Dev/Silverlight.Controls.ToolTips/ToolTipService.cs	(revision 58106)
+++ Dev/Silverlight.Controls.ToolTips/ToolTipService.cs	(working copy)
@@ -314,6 +314,10 @@
                             CurrentToolTip.CloseAnimation.Begin();
                         else CurrentToolTip.IsOpen = false;
                     }
+
+                    var toolTipTimer = CurrentToolTip.Timer;
+                    if (toolTipTimer != null)
+                        toolTipTimer.StopAndReset();
                 }
             }
         }

Otherwise the tooltip will reappear after $InitialDelay again.

Read the full discussion online.

To add a post to this discussion, reply to this email (tooltipservice@discussions.codeplex.com)

To start a new discussion for this project, email tooltipservice@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Feb 23, 2011 at 4:19 PM

Just another suggestion here, it also doesnt work if the mousedown event gets handled before reaching the rootvisual - i had to change the section where you attach the events to the following:

 

 rootVisual.MouseMove += OnRootVisualMouseMove;            

rootVisual.SizeChanged += OnRootVisualSizeChanged;          

rootVisual.AddHandler(UIElement.MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnRootVisualMouseLeftButtonDown), true);        }

 

Coordinator
Feb 24, 2011 at 7:40 PM
Thanks for the smart suggestion, didn't think about that one!

Your suggested fix has been applied into the latest sources.

Cheers,
Xavier

2011/2/23 juries <notifications@codeplex.com>

From: juries

Just another suggestion here, it also doesnt work if the mousedown event gets handled before reaching the rootvisual - i had to change the section where you attach the events to the following:

rootVisual.MouseMove += OnRootVisualMouseMove;

rootVisual.SizeChanged += OnRootVisualSizeChanged;

rootVisual.AddHandler(UIElement.MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnRootVisualMouseLeftButtonDown), true); }

Read the full discussion online.

To add a post to this discussion, reply to this email (tooltipservice@discussions.codeplex.com)

To start a new discussion for this project, email tooltipservice@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com