c# - Disable a command from code -


i have command want disable depending on logged user role, there way "block" command , make not trigger code ?

<dxmvvm:eventtocommand x:name="ev_comm" passeventargstocommand="true" command="{binding editcommand}" eventname="mousedoubleclick" markroutedeventsashandled="true"> 

something this:

myviewmodel = (myviewmodel)datacontext;  a.editcommand.disable; 

thanks


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -