May 15, 2015 at 5:14 PM
Edited May 15, 2015 at 5:26 PM
I'm having a problem using the Messenger while Navigating.
I am not able to use the OnNavigatedTo event.
Instead i now tried to use the messenger but it doesnt seem two work for me either.
I implemented a class:
public class CreateLogBookMessage : GenericMessage<Machine>
public CreateLogBookMessage(object sender, Machine selectedMachine)
and then registerted for it in my ViewModel:
this, LogBookMessage =>
this.SelectedMachine = LogBookMessage.Content;
Finally i navigated in my RelayCommand:
var createLogBookMessage = new CreateLogBookMessage(this, this.SelectedMachine);
I set a breakpoint on the Property in the receiving VM but it doesnt seem to get a message at all.
Any ideas? If you could solve the question on stackoverflow, it would help me, too :)
I found out that the receiving VM constructor is called AFTER the Message is sent. How can i register the message so that the rec. VM will listen to it once constructed?