IsEnabled not usable anymore

Sep 23, 2010 at 2:30 PM

When I e.g. have a Button where I use Message.Attach and bind IsEnabled as well like:

<Button IsEnabled="{Binding ElementName=list,Path=SelectedItem,Converter={x:Static Helpers:NullToBooleanConverter.Instance}}"
        ca:Message.Attach="DeleteRole(list.SelectedItem)">Delete Role</Button>

then the IsEnabled binding has no effect, because IsEnable will be overwritten by Micros' default CanExcecute.

My suggestion is to set CanExcecute to null by default (instead of () => true) and only set IsEnabled if CanExecute is != null.

If you like my solution, please pull: https://hg01.codeplex.com/forks/etobi/caliburnmicroetobi/rev/1d7d489fc9bb

 

Coordinator
Sep 23, 2010 at 5:24 PM

Thanks for working on that. I'll try to pull that down in the next day or so and get that into the master.