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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -