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

How to Refresh the Bindings on Page1 when some data has been changed in Navigated Page2

$
0
0

Hi Guys,

I have some property which I am using from Page2 in Page1ViewModel, When I navigate to Page2 I have changed that property and on coming back by doing NavigiationPop.
Page1is not re-loaded/ refreshed at all as I have set the BindingContext in the constructor of Page1, which is loaded only once.

The solution which is working for me is
Setting the BindingContext to the ViewModel on "onAppearing()", usually its not consider the best practice. But I also need to refresh the values which I have changed on Page2.

Looking forward for your valuable inputs and suggestions.
Also Pros/Cons of Setting the BindingContext in OnAppearing.

Thanks,
Hemant


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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