In several online examples, I found this:
public partial class ForecastPage : PhoneApplicationPage { Forecast forecast; public ForecastPage() { InitializeComponent(); } protected override void OnNavigatedTo(NavigationEventArgs e) {
but in others I found using the Load
event like
public partial class Person : PhoneApplicationPage { private PersonViewModel _ViewModel; public Person() { InitializeComponent(); this.Loaded += new RoutedEventHandler(SearchView_Loaded); } void SearchView_Loaded(object sender, RoutedEventArgs e) {
I know that OnNavigatedTo
fires before the Load
event, but both lights before the user interface is pulled into the phone, so my question is there any advantages to using one method from the other?
source share