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

What is the preferred way to update the Master DataContext?

$
0
0

My Master page (NavigationDrawer) contains a ListView of items that are bound to the DataContext.Navigation collection.

That collection has a flag bool IsCompleted;.

I need to update that flag from fairly deep within the app. The way I see it, there is three ways to achieve the task

  1. Use a messenger to signal back to the MainPage that the ViewModel has been updated
  2. Expose the DataContext as a public static
  3. Inject the DataContext all the way up the object graph until it reaches the command object

What is the preferred way to update the Master DataContext?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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