I am taking my first steps here with TriggerAction and ViewModel in CSLA.
After creation of a TriggerAction and binding it to a button the following question pops up:
How do you organize your TriggerActions in the XAML? It seems like there will be a
whole bunch of TriggerAction for things like Save, AddNew.
And must I declare two separate TriggerAction to get a Save Button and a Save Menu Item?
Yes, one TriggerAction listens to one event, from one UI control. So you need a different TriggerAction to listen to each UI event of each different UI control.
This isn't the only option out there, and if this approach disturbs you, one option is to evaluate some of the other options:
Basically, Microsoft didn't provide a comprehensive solution in the box - certainly not one that does everything we all want, and also works with the VS designer and with the Blend designer.
So everyone has had to create some solution of their own.
TriggerAction is the third solution I've come up with - after InvokeMethod and Execute. It isn't perfect, but it is (imo) better than the previous two attempts.
I really like the Blend SDK solution, except that attached properties aren't supported by the VS designer, so that solution forces you to type lots of XAML by hand...
Copyright (c) Marimer LLC