Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Provide sample code for the demos (at least for the Layered Layout demo) (Read 2267 times)
martink
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Jan 4th, 2014
Provide sample code for the demos (at least for the Layered Layout demo)
Jan 4th, 2014 at 5:20am
Print Post  
Hello,

Can you please provide the source code used for the Diagramming demos for asp.net. It will be really helpful to see what is possible and then to see how it is done. What I need right now is to understand how the Layered Layout demo is implemented as I have a few challenges - e.g. put the text below the image.

Thanks,
Martin
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Provide sample code for the demos (at least for the Layered Layout demo)
Reply #1 - Jan 4th, 2014 at 10:10am
Print Post  
Hello,

You can find sample projects installed with the control, under the ProgramFiles\MindFusion...\VS2010\Samples\ folder. There are also VS2008 and VS2012 versions available, installed if you select the respective options during setup.

Regarding putting text below images, check the IconNodes sample project. It demonstrates how to create custom node types that draw images and labels, with variants for both Canvas and ImageMap front-ends.

In the same location you can also find the LayeredLayout sample project. It implements a text-below-image node using the standard ShapeNode class, where the Image is top-aligned and Text is bottom aligned:

Code
Select All
// create the box
ShapeNode node = diagram.Factory.CreateShapeNode(
    rnd.Next(10, 520), rnd.Next(10, 340), 40, 50);
node.Text = diagram.Nodes.Count.ToString();
node.TextFormat.LineAlignment = StringAlignment.Far;
node.HyperLink = "http://mindfusion.eu";
//node.HyperLink = "javascript: void alert('clicked')";

// setup icon
node.Transparent = true;
node.Image = new Bitmap(
    Server.MapPath("Images\\" + rnd.Next(4).ToString() + ".png"));
node.ImageAlign = ImageAlign.TopCenter; 



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


I Love MindFusion!

Posts: 12
Joined: Jan 4th, 2014
Re: Provide sample code for the demos (at least for the Layered Layout demo)
Reply #2 - Jan 10th, 2014 at 10:01am
Print Post  
Hi Stoyo,

Many thanks!

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