wpf - Can Execute of a ICommand while a Context menu open -


a control has contextmenu , menuitem bound icommand. icommand's can execute has code enable , disable menuitem. hits while loading , checks can execute can hit while open contexmenu , need hit(checks) each time while opening contextmenu.

<border>     <border.contextmenu>         <contextmenu>             <menuitem command="{binding savecommand, source={staticresource vm}}" commandparameter="{binding}" header="menu1" />        </contextmenu>      </border.contextmenu> </border> 

how done this. idea?

you should trigger event icommand.canexecutechanged() viewmodel shall cause control invoke canexecute viewmodel.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -