Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Default Shape (Read 2151 times)
tl
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Oct 30th, 2012
Default Shape
Aug 16th, 2013 at 4:06pm
Print Post  
I would like to create a note node when dragging on the diagram.

Is it possible to use the DefaultShape, and 1) change the color, 2) add shadow effect, 3) make it editable, 4) maybe multiple editable regions like a header/contents, 5) make it collapsible?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Default Shape
Reply #1 - Aug 16th, 2013 at 4:57pm
Print Post  
If the note node will be a ShapeNode, then indeed its Shape property will be initialized from DefaultShape when drawing with the mouse. Alternatively, you can set property values for interactively drawn nodes from the InitializeNode event - it is raised just before the user sees the new node.

1) change the color

Set node.Brush;

2) add shadow effect

Set node.Effect = new DropShadowEffect();

3) make it editable

If you enable AllowInplaceEdit, you can edit node's text by double clicking. Alternatively, you could call the BeginEdit method from NodeClicked event if you prefer single-click edit.

4) maybe multiple editable regions like a header/contents

You could use a TableNode and show text in its Caption area and cells.

5) make it collapsible?

If you mean collapsing a tree branch rooted at that node, set the node.Expandable property to display a +/- icon for expand / collapse. If you mean the node's content should collapse/expand, you could for example set table's Bounds.Height = table.CaptionHeight to collapse the content in response to NodeClicked events.

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