Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

MessagingCenter used for Navigation, when to subscribe/unsubscribe messages

$
0
0

Hi Guys,

i have the following NavigationStack:

MainPage
OverviewPage
VehicleStatePage
ImagePage

VehicleStatePage is a galery of images. You can tap the images and navigate into a ImagePage. The event is in the code behind of VehicleStatepage.
You can also go from ImagePage to the next ImagePage. If you do so I send a message from ImagePage to the code behind of VehicleStatePage on order to simulate the same behaviour like the user tapped this specific image from VehicleStatePage. So navigating from VehicleStatePage to ImagePage uses the same event like navigating from ImagePage to ImagePage.

Now i was wondering where is the best place to subscribe/unsubscribe to the message to avoid multiple subscriptions.

Thank you, Gelatto


Viewing all articles
Browse latest Browse all 204402

Latest Images

Trending Articles



Latest Images

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