Caliburn Micro, Message / Action for another ViewModel

I have a ShellViewModel with several subzones (and viewmodels). A subview can easily bind to a method in ShellViewModel with Message.Attach. He is bubbling. But can I go down so that ShellViewModel runs the method in sub ViewModel or even from one additional view up and then down to another?

AFAIK I can use EventAggregator, but is this the most elegant way?

+3
source share
1 answer

I believe that there is no such thing as a bubble. But you can use Bind.ModelWithoutContext to move the action target to your child ViewModel:

<Button cal:Message.Attach="DoIt" cal:Bind.ModelWithoutContext="{Binding Path=ChildViewModel}" Content="Test It!"/>

"" https://caliburnmicro.codeplex.com/wikipage?title=All%20About%20Actions. , .

+4

All Articles