Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Create a diagram dynamically (Read 4167 times)
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Create a diagram dynamically
Nov 26th, 2008 at 5:19pm
Print Post  
Hi!

We're trying the WpfDiagram component and looks pretty good for us, we'd like to clarify some doubts before buy it for ensure that fulfill our expectations.

As there's not support for data binding yet, could you give me some guidelines for generate a diagram dynamically from data? We are interested in represent our data as diagrams, and give to each box the ability to drill down to the DataRow or entity object that is representing. I guess we'll have a boxes and links tables or entities arrays, and we need represent them and... in some way... bind the elements, so may be keeping a simple Id in the box/link would be enough.

Could we disable the design mode programatically? I mean, sometimes we'll want to show a diagram, be able to drill down to data but don't be able to move, resize or delete graphical elements ( and therefore data).

And finally (by the moment Grin) do you have a tutorial, documentation or example about how we can create our own shapes and DiagramNodes?

Our application is based on dynamic data, the most of the times is data binded and the rest we have to implement our own data binding mechanisms. The points more important for us, are the ability to create diagrams from data and create data from diagrams that we could develop using WpfDiagram as UI.

Cheers.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create a diagram dynamically
Reply #1 - Nov 26th, 2008 at 7:09pm
Print Post  
Hi,

This post shows one way to create diagram items from you data:
http://mindfusion.eu/Forum/YaBB.pl?board=fcnet_disc;action=display;num=122477128...

Use the Tag property to keep an id as shown in the code above.

Set Diagram.Behavior = DoNothing to disable user interaction. You will still get Clicked events that will let you implement drill-down.

There are some tutorials available for our Windows Form control:
http://www.mindfusion.eu/onlinehelp/flowchartnet/index.htm

Regarding creation of custom node types, check the IconNodes and FishBone samples.

As for designing custom shapes, run the ShapeDesigner tool and unleash your creative potential Wink

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Create a diagram dynamically
Reply #2 - Nov 27th, 2008 at 4:38pm
Print Post  
thanks
  
Back to top
 
IP Logged
 
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Create a diagram dynamically
Reply #3 - Dec 1st, 2008 at 3:00pm
Print Post  
Hi,

Where could I find the Fishbone and Iconnode samples ?

I've been trying the FCDemo, and I'd like to know, how can I create tablenodes like in the ERM sample?. Looks pretty good but I didn't find a way to do it Tongue I mean:

- how to put pictures in TableNode.Rows.
- how to put pictures with their own events (in the ERM sample there is a picture that when you clicked it appears a dialog)
- how to fix the anchors to a certain rows.

Cheers.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create a diagram dynamically
Reply #4 - Dec 1st, 2008 at 3:26pm
Print Post  
Hi,

We have them only for the Windows Forms control, but the diagramming API is the same so you can apply them to WPF too. A difference is that in WPF you must override the SaveToXml and LoadFromXml method to implement custom serialization.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Create a diagram dynamically
Reply #5 - Dec 1st, 2008 at 3:48pm
Print Post  
Ok, I'll download them.

What about the pictures in the tables?  Grin
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create a diagram dynamically
Reply #6 - Dec 2nd, 2008 at 6:12am
Print Post  
Regarding tables, when you download the win-forms version also check the Entities sample.

- how to put pictures in TableNode.Rows.

You set the Image property of some cell, e.g. table[0, 0].Image = anImage;

- how to put pictures with their own events (in the ERM sample there is a picture that when you clicked it appears a dialog)

If the image is inside a cell, you could handle the CellClicked event. The icons at the bottom of tables in the Entities sample are ShapeNodes, attached to the table using the AttachTo method. For such icons, handle the NodeClicked events.

- how to fix the anchors to a certain rows.

Set Row.AnchorPattern, e.g. table.Rows[0].AnchorPattern = ...;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Create a diagram dynamically
Reply #7 - Dec 2nd, 2008 at 10:48am
Print Post  
thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint