Oct 16, 2010 at 2:50 AM

What's the best replacement for this? :)

(218 Errors remaining in my migration to CM. :) :) :)).

Oct 16, 2010 at 8:07 AM

There is no OOB mechanism to customize the availability effect on a per-action basis, in CM.
Yet, the framework actually does check the availability of Actions against a guard method and updates the UI accordingly; it only does it *always* setting IsEnabled property.
You can, however, replace the ActionMessage.ApplyAvailabilityEffect delegate to change the way the (un)availability is represented in the UI.
Since in the delegate you have access to the MethodInfo of the action, you can easily take different strategies based on the attributes applied the method itself.

Oct 16, 2010 at 11:48 AM

Hm.  Interesting.

I was able to churn through all my errors.  Piece of cake, actually (most of them had to do with broken using references and corresponding extension methods).  Now it's time to actually make this puppy work, heh.  Looking into ActionMessage now (as well as your Filters recipe)...  Thanks!

Oct 16, 2010 at 12:53 PM

After your port, would you be interested in writing something up on that? I'm sure others would be interested in that and we could use something like that for the docs.

Oct 16, 2010 at 1:14 PM

I'm actually building an HelloWorld application that shows off all the neat concepts of how I'm using Caliburn.Micro.  I still have a macro framework, however. ;)