Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Drag ControlNode form NodeListView (Read 2311 times)
invader
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 1
Joined: Nov 19th, 2012
Drag ControlNode form NodeListView
Nov 19th, 2012 at 6:13am
Print Post  
Can I drag a ControlNode form NodeListView to Diagram? I have tried but it thrown an NullReferenceException.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drag ControlNode form NodeListView
Reply #1 - Nov 19th, 2012 at 8:08am
Print Post  
It seems there isn't any method available to automatically clone controls in Silverlight, and we haven't implemented the Clone(bool) method in ControlNode, which is called by NodeListView to add dragged nodes to the diagram. For the time being, you could derive from ControlNode and implement your own Clone method:

Code
Select All
public override DiagramItem Clone(bool clipboard)
{
	var clone = new MyNode();
	clone.Control = new MyControl();
	return clone;
} 



For the next release we'll see if we can implement it in the base class using reflection.

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