Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to make the diagram view in readonly mode? (Read 2028 times)
Homam
Junior Member
**
Offline


I Love MindFusion!

Posts: 67
Joined: Feb 7th, 2012
How to make the diagram view in readonly mode?
Aug 28th, 2012 at 10:23am
Print Post  
How to make the diagram view in readonly mode? Selecting nodes is allowed but not adding new nor moving nor connecting/disconnecting any of its objects.

Behavior.Modefy: Prevents creating new nodes, allows selection but it allows moving the nodes which is undesirable.

Behavior.None: Prevents everything including selection which is required in my case.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to make the diagram view in readonly mode?
Reply #1 - Aug 28th, 2012 at 10:30am
Print Post  
You could create a custom behavior class that always returns null from StartDraw, or do one of the following with standard behaviors:

- Behavior.Modify: set args.Cancel from the NodeStartModifying and LinkStartModifying events;
- Behavior.None: set args.Node.Selected / Link.Selected from NodeClicked and LinkClicked events;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Homam
Junior Member
**
Offline


I Love MindFusion!

Posts: 67
Joined: Feb 7th, 2012
Re: How to make the diagram view in readonly mode?
Reply #2 - Aug 28th, 2012 at 4:13pm
Print Post  
It helps, thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint