Ports and component highlighting during hover


within the standard linking tool a port or component will be highlighted after a mouse click. Can I configure the lining tool in that way, that the port or component will be already highlighted when I hover the specified element by uisng the mouse?

Thank you very much!

Kind regards,


I’m not clear that I understand what you want to do. You can use the standard WPF/Silverlight functionality for responding to mouse events, if you want to have a port be highlighted as the mouse passes over it or hovers over it.

The default linking tool draws a rectangle around the port or node figure if I click on it. I just want to have this effect when I already hover about a node or port within the diagram.

Did you want to do something like what the FlowChart sample does? When the mouse enters a Node it makes all of the ports “visible”. (Actually a Binding changes the Stroke property of each port element.)

Nearly but I just want to change the stroke of a node or a port figure which is currently hovered by the mouse cursor. I think it would be easy if I can use the highlight functionality of the linking tool. It des exactly what I need. It changes the stroke of the specified element when I press the left mouse button on it. And I need the same functionality without a click.

The problem is that the LinkingTool is designed to only “highlight” the start port and potential valid target ports while that tool is active. When the mouse is passing over elements (whether quickly or after hovering) the current tool (i.e. Diagram.CurrentTool) remains the ToolManager. It’s only because the user does a mouse-down on a port element that the LinkingTool starts running and is activated that it highlights that port by adding the LinkingBaseTool.TemporaryFromNode to the diagram and calling CopyPortProperties to make sure the TemporaryFromPort is at the proper location with the proper size et al.

Can I implement an own tool, which provides the highlight functionality?

If you just want to implement appearance changes on mouse-over or mouse-hover I don’t think you should bother with a tool. Just implement what you want using the standard WPF/Silverlight functionality. That code could make use of the Diagram.LinkingTool.TemporaryFromPort’s properties, if you want it to appear the same when the user actually does a mouse-down and mouse-drag to start the LinkingTool.