Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram Commands causing problems (Read 4551 times)
hrumayor
YaBB Newbies
*
Offline



Posts: 24
Location: Canada
Joined: Jun 3rd, 2009
Diagram Commands causing problems
Jul 15th, 2010 at 4:05pm
Print Post  
Hi,

On static Diagram() there is a call to RegisterCommands() the commands that I need are slightly different than these and it gives me problems if I register my own commands also, it would be nice if this would not be the default or there was a way to disable them, I was not aware of this auto registration at first and had the commands duplicated, so I had to recompile and remove the static RegisterCommands, what would happen is that under certain circumstances the menus would be enabled when they should not be, because copy and cut are are always enabled on RegisterCommand.

Regards,
Hugo
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram Commands causing problems
Reply #1 - Jul 15th, 2010 at 4:25pm
Print Post  
Hi,

You can call the following to override the class bindings:

Code
Select All
diagram.CommandBindings.Add(
new CommandBinding(ApplicationCommands.Copy, ... 



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



Posts: 24
Location: Canada
Joined: Jun 3rd, 2009
Re: Diagram Commands causing problems
Reply #2 - Jul 15th, 2010 at 8:51pm
Print Post  
Hi,

I had something like that over the Main Window not the diagram, and in it works but both commands stay active, I have not tired to override it on the diagram object, but I remember I had to move the command bindings to the main window or they would not work sometimes if they were on the diagram.

I will give it a try.

Regards,
Hugo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint