Skip to content

Does WeakReferenceMessenger lack Maui MessagingCenter Compatibility? #492

Answered by michael-hawker
IndianaGary asked this question in Q&A
Discussion options

You must be logged in to vote

@IndianaGary you can create any type of Message class you want which can take any sort of object.

For instance, something like this:

public MyMessageClass {
    public MyObjectClass MyObject { get; init; }

    public MyMessageClass(MyObjectClass obj)
    {
        MyObject = obj;
    }
}

messenger.Send<MyMessageClass>(new(instanceOfMyObject));

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@IndianaGary
Comment options

Answer selected by michael-hawker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants