Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

MessagingCenter

$
0
0

I am fairly new to Xamarin and Xamarin.Forms. I am currently trying to use the MessagingCenter to pass a object between my ViewModels. It was working earlier but doesn't now. When I Try to debug it says that "MessagingCenter.Send Unknown member: Send." and on the receive side it says "Could not resolve type: global::Xamarin.Forms.MessagingCenter.Subscribe<MyViewModel, MyData>"

on the sending ViewModel my call looks like this:

MessagingCenter.Send(this, "info", MyData);

and on the receiving ViewModel it looks like this:

MessagingCenter.Subscribe<MyViewModel, MyData>(this, "info", (sender,  arg) =>
        {
            //doing stuff
        });

Any help would be appreciated. I have looked at some other examples trying to figure this one out. It looks like am doing it right..


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>