wpf - Does caliburn micro support IsEnabledChanged? -


i want have method fire when button's enabled state changes, not work. method void enablestartscan(bool isenabled) in view model never gets called.

<telerik:radribbongroup header="{x:static res:stringtable.machinectrl}">     <telerik:radribbonbutton x:name="btnstart"                               text="{x:static res:stringtable.start}"                               size="large"                              largeimage="/mcsp;component/resources/images/button-start.png">         <i:interaction.triggers>             <i:eventtrigger eventname="isenabledchanged">                 <cal:actionmessage methodname="enablestartscan">                     <cal:parameter value="{binding elementname=btnstart, path=isenabled}"/>                 </cal:actionmessage>             </i:eventtrigger>          </i:interaction.triggers>      </telerik:radribbonbutton> </<telerik:radribbongroup> 

wy not control state of button in viewmodel in first place? add gate method in viewmodel , add trigger other action within viewmodel

public bool cansayhello(string name) {     if(evalifenable())     {         yourothermethod();         return true;     }      return false; }  public void sayhello(string name) {     executeyouraction(); } 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

angularjs - ng-repeat duplicating items after page reload -