ActionMessage shortcut

Jan 3, 2011 at 3:22 PM


In my Caliburn Application I use the action shortcut  cm:Message.Attach="[Event MouseLeftButtonDown] = [Action DoSomething]

a lot. But looking at the winners of the contest and at samples on the forum it seems like most people prefer the wordier way:


               <i:EventTrigger EventName="Click">

                   <cal:ActionMessage MethodName="SayHello">

                       <cal:Parameter Value="{Binding ElementName=Name, Path=Text}" />





Which is the best?



Jan 3, 2011 at 4:00 PM

It may mean that they added those behaviors with Blend. It really depends on how your development team (or you) prefer to work.

Jan 4, 2011 at 3:34 PM


I think that the shorter version is good if you prioritize being able to see your structure without having to scroll down.
On the other hand, the longer version is more consistant with how xaml code usually look.

Oh well, as you say: It depends on how you prefer to work.