Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Disable DefaultShape for diagram (Read 3462 times)
SL_developer
YaBB Newbies
*
Offline


coding rocks

Posts: 43
Joined: Jul 26th, 2011
Disable DefaultShape for diagram
Jul 28th, 2011 at 10:14am
Print Post  
Hi,
How to disable DefaultShape of diagram?
I don't want to draw any shapes from mouse.

Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Disable DefaultShape for diagram
Reply #1 - Jul 28th, 2011 at 10:31am
Print Post  
Try this:

Code
Select All
diagram.Behavior = Behavior.DoNothing; 


Regards,
Meppy
  
Back to top
 
IP Logged
 
SL_developer
YaBB Newbies
*
Offline


coding rocks

Posts: 43
Joined: Jul 26th, 2011
Re: Disable DefaultShape for diagram
Reply #2 - Jul 28th, 2011 at 10:43am
Print Post  
Thanks that works, but It works till we didnt select any shape in diagram.
once you click on any shape its behavior change to default, so I need to put this in mouse move event as well
Code
Select All
void diagram_MouseMove(object sender, MouseEventArgs e)
{


diagram.Behavior = Behavior.DoNothing;
}
 



Now it works fine

Thanks again
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Disable DefaultShape for diagram
Reply #3 - Jul 28th, 2011 at 11:18am
Print Post  
The behavior is not supposed to change implicitly. Are you sure you are not modifying it manually in response to some user action, such as selecting a node?

Regards,
Meppy
  
Back to top
 
IP Logged
 
SL_developer
YaBB Newbies
*
Offline


coding rocks

Posts: 43
Joined: Jul 26th, 2011
Re: Disable DefaultShape for diagram
Reply #4 - Jul 28th, 2011 at 12:03pm
Print Post  
yes i am sure, in my application there are two diagrams , 1st contain all shape nodes , for 2nd : user will drag n drop shapes from 1st to 2nd.

for 1st diagram if i didnt locked all nodes then behaviour changes, that's why i locked down all nodes,so that user can not modify it & it will be used for dragging only
Code
Select All
 node.Locked = true;
 



and above code works
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint