You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the messenger from the toolkit. Specifically, I am sending a message to a page from the main page. If I do not navigate to the second form before sending, the message does not get delivered to the second form. If I do navigate there and back, the messages work as expected. This seems to make sense that the registration to the message has not occurred yet.
Is there any way to send the message and then navigate to the form?
As an additional point, how are you registering your pages/view models? Transient/singleton/scoped? As you may be getting unexpected behavior if your page receives the message after you navigate away.
Type of issue
Other (describe below)
Description
I am using the messenger from the toolkit. Specifically, I am sending a message to a page from the main page. If I do not navigate to the second form before sending, the message does not get delivered to the second form. If I do navigate there and back, the messages work as expected. This seems to make sense that the registration to the message has not occurred yet.
Is there any way to send the message and then navigate to the form?
Page URL
https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/messenger
Content source URL
https://github.com/MicrosoftDocs/CommunityToolkit/blob/main/docs/mvvm/Messenger.md
Document Version Independent Id
6f38cc35-64a9-f509-76b6-03469b43cd8b
Article author
@Sergio0694
Metadata
The text was updated successfully, but these errors were encountered: