Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ControlNode and Diagram.NodeClicked event (Read 1471 times)
jmcnair
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Apr 23rd, 2008
ControlNode and Diagram.NodeClicked event
Nov 14th, 2009 at 6:08am
Print Post  
I'm not sure what I'm doing wrong here. I'm using ControlNodes inside a Diagram, and I'm subscribing to the NodeDoubleClicked and NodeClicked events on the Diagram from inside the ControlNode.

The NodeDoubleClicked event fires, but the NodeClicked event does not. What is going wrong? Is the single click being intercepted and handled elsewhere?

-Jason
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ControlNode and Diagram.NodeClicked event
Reply #1 - Nov 16th, 2009 at 7:28am
Print Post  
This might happen if the hosted control sets MouseButtonEventArgs.Handled = true in mouse button related events, or if it captures the mouse. That prevents the mouse events from reaching the diagram. In WpfDiagram are able to work around this by handling the preview version of the mouse events, which unfortunately are not available in Silverlight.

If you are using your own controls, try setting Handled = false from the mouse events, or don't capture the mouse. Otherwise you could try calling Diagram.RaiseClicked from a similar event raised for the hosted control, e.g. Button.Clicked.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint