Message.Attach: Use property of $dataContext

Jan 7, 2011 at 1:44 PM

Hello,

I can't use the following syntax to attach an action to a button, and to pass a property of the DataContext to the method:

[Event MouseDown] = [Action Do($dataContext.Property)]

Is it possible? Or is there a workaround?

Thanks in advance

Mike

Coordinator
Jan 7, 2011 at 1:54 PM

You cannot dot through properties with Caliburn.Micro. You can pass the whole DataContext, but not a specific property. If you want to support that, you will have to do a lot of customization. I recommend you don not go that route.

Jan 7, 2011 at 2:03 PM

Ok, then I won't :)

Thanks for the advice