Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Change Diagram Window Shape (Read 5769 times)
rakesh
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Aug 21st, 2012
Change Diagram Window Shape
Aug 21st, 2012 at 11:59am
Print Post  
Hello,

I am currently evaluating MindFusion WPF Diagram for our company, and I have a question.

1)I had dragged diagram control from toolbox to WPF mainwindow.
2) By default shape of the diagram control is Rectangular
3) is there any way where i can change the shape of the diagram from Rectangular to Eclipse or some other
And i also wanted to know how to use the style property of Diagram? what is static and Dynamic in Style.

thanks,
Rakesh

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Change Diagram Window Shape
Reply #1 - Aug 21st, 2012 at 3:58pm
Print Post  
Hello,
You can assign non-rectangular shapes to nodes, and not to the diagram control itself. As a work-around, you might set the diagram's background brush to transparent and add a Locked elliptical ShapeNode to serve as background.

Styling can be done on individual nodes or node types. You can find an example here:
http://www.mindfusion.eu/onlinehelp/wpfdiagram/index.htm?CC_Customizing_the_Appe...

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


I Love MindFusion!

Posts: 2
Joined: Aug 21st, 2012
Re: Change Diagram Window Shape
Reply #2 - Aug 23rd, 2012 at 7:57am
Print Post  
Hi,

Thanks fro the Reply.

I have a scenario where I will create a Shape like Ellipse in the diagram (canvas) and i will resize the canvas to the Ellipse

1) Now I wanted to add shapes within in the Ellipse (2.jpg) but not in the Diagram Canvas outside the ellipse as in (1.jpg) could you please let me now how to do this.
  

2.jpg (Attachment deleted)
1.jpg ( 132 KB | 212 Downloads )
1.jpg
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Change Diagram Window Shape
Reply #3 - Aug 23rd, 2012 at 8:17am
Print Post  
You can use the Ellipse equations to find out if a point is inside the ellipse:

bool inside = (x/a)^2 + (y/b)^2 < 1

and then handle diagram's or drag-and-drop validation events to allow drawing only inside the ellipse depending on how you let your users add nodes.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Change Diagram Window Shape
Reply #4 - Aug 23rd, 2012 at 11:19am
Print Post  
.. or you could check if ellipseNode.ContainsPoint() returns true.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint