CSLA 4 TriggerAction Example

CSLA 4 TriggerAction Example

Old forum URL: forums.lhotka.net/forums/t/8963.aspx


Ranjini posted on Thursday, May 20, 2010

Can someone provide a quick example of how one might use the triggeraction control to invoke several different actions on a control event? If I instatiated more than one TriggerAction control and associated them all to the same control event, are these actions invoked asynchronously or synchronously and if so in what order?

Thanks!

Ranjini

RockfordLhotka replied on Thursday, May 20, 2010

One TriggerAction control handles an event from a UI control and invokes one viewmodel method. You can have any number of TriggerAction controls listening for the same UI event, each invoking a different viewmodel method.

The events are handled using standard .NET event handling. That means they are synchronous and the order is indeterminate - just like any other .NET event handlers.

Copyright (c) Marimer LLC