Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Need to know Features (Read 4785 times)
SL_developer
YaBB Newbies
*
Offline


coding rocks

Posts: 43
Joined: Jul 26th, 2011
Need to know Features
Apr 25th, 2012 at 9:27am
Print Post  
Hi,
Just want to know below options are possible with Mind fusion Diagramming or not :
1. Shape Copy,Paste,Cut
2. Export to .Png or .Bmp
3. If Diagram drawn and user wants to do Undo or Redo on diagram, is this possible?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need to know Features
Reply #1 - Apr 25th, 2012 at 10:37am
Print Post  
Hi,

1. There are CopyToClipboard, CutToClipboard and PasteFromClipboard methods available in the Silverlight 4 build of the control.

2. Use the SaveToPng method or CreateImage with third party encoders (see http://mindfusion.eu/Forum/YaBB.pl?num=1328022990/1#1)

3. Set Diagram.UndoEnabled.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
SL_developer
YaBB Newbies
*
Offline


coding rocks

Posts: 43
Joined: Jul 26th, 2011
Re: Need to know Features
Reply #2 - Apr 27th, 2012 at 5:02am
Print Post  
Hi Stoyo
Thanks for your reply,

Can you please tell me one more thing :
I am looking for one scenario like if user drops a Shape1 from toolbox on another Shape2 in diagram then
this will create a connection between
Shape1 (destination) to Shape2 (origin)

Will this be possible? if yes Can you please provide some samples

Thanks again Smiley
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need to know Features
Reply #3 - Apr 27th, 2012 at 5:12am
Print Post  
Hi,

That's shown in the TreeLayout sample project, here's a part of the MouseUp handler:

Code
Select All
Point diagramPosition = e.GetPosition(diagram);
DiagramNode parent = diagram.GetNodeAt(diagramPosition);
if (parent != null)
{
	ShapeNode child = new ShapeNode(diagram);
	child.Image = draggedImage.Source;
	diagram.Nodes.Add(child);

	DiagramLink link = new DiagramLink(diagram, parent, child);
	diagram.Links.Add(link);
	...
}
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
SL_developer
YaBB Newbies
*
Offline


coding rocks

Posts: 43
Joined: Jul 26th, 2011
Re: Need to know Features
Reply #4 - Apr 27th, 2012 at 5:31am
Print Post  
Yes, that's work perfectly.

In the same case :
Shape 1 (Origin) connected with Shape 2 (destination)
Now If I drag a shape3 & drop on connected link of Shape 1&2 then
diagram should get break & this should become

Shape1 ---> Shape3 ---> Shape2

How can I do this case?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need to know Features
Reply #5 - Apr 27th, 2012 at 5:36am
Print Post  
Something like

var oldLink = diagram.GetLinkAt(...);
var shape3 = diagram.Factory.CreateShapeNode(...);
diagram.Factory.CreateDiagramLink(oldLink.Origin, shape3);
diagram.Factory.CreateDiagramLink(shape3, oldLink.Destination);
diagram.Links.Remove(oldLink);

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