Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic NodeStartModifying Event and selected Item (Read 2107 times)
kai-uwe.zoland
YaBB Newbies
*
Offline



Posts: 18
Joined: Sep 5th, 2008
NodeStartModifying Event and selected Item
Jun 29th, 2010 at 9:19am
Print Post  
Hello,

I have a problem with NodeStartModifying event.
I have two nodes in the diagram selected. When I click on the activeitem and start to drag the node, I get the event and can do my handling. If I try the same for the other node (that is just selected and not the active item) I get the SelectionMoving event but not the NodeStartModifying. Is there a way to get this NodeStartModifying also for this other selected item instead of the SelectionMoving?

Property settings I currently use:
DiagramNode.HandlesStyle = InvisibleMove
Diagram.Behaviour = Custom and no CustomBehaviour class used.


Please advise
Thank you
  Kai-Uwe
  
Back to top
WWWYIM  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NodeStartModifying Event and selected Item
Reply #1 - Jun 29th, 2010 at 1:24pm
Print Post  
Hi,

There's only SelectionMoving raised, at this time you can't get NodeStartModifying for the individual selected nodes. From the SelectionMoving handler you can loop over diagram.Selection.Nodes to find out what nodes are moved.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
kai-uwe.zoland
YaBB Newbies
*
Offline



Posts: 18
Joined: Sep 5th, 2008
Re: NodeStartModifying Event and selected Item
Reply #2 - Jun 29th, 2010 at 2:53pm
Print Post  
Thanks for your help. I just thought there would be a way to the StartModifying event.

I now found a way inside the SelectionMoving Event to get the mouse position and find with it the diagram item.

Regards
Kai-Uwe

[code]
void SelectionMoving(object sender, ValidationEventArgs e)
{

if (!m_NodeMove)
{
Point _currMousePoint = Mouse.GetPosition(m_mfDiagram);
MindFusionWpf.DiagramNode _node = m_mfDiagram.GetItemAt(m_mfDiagram.ClientToDoc(_currMousePoint), true) as MindFusionWpf.DiagramNode;

if (_node != null)
{
this.BeginMovingNode(_node);
}
}
e.Cancel = true;
e.CancelDrag();
}
[/code]

  
Back to top
WWWYIM  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint