protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); if (_firstLoad) { _firstLoad = false; _cancelBtn = ApplicationBar.Buttons[0] as ApplicationBarIconButton; _nextBtn = ApplicationBar.Buttons[1] as ApplicationBarIconButton; _saveBtn = ApplicationBar.Buttons[2] as ApplicationBarIconButton; ApplicationBar.Buttons.Clear(); ApplicationBar.Buttons.Add(_nextBtn); if (NavigationContext.QueryString["event"] == "create") { _vm.HandleNewBabyEvent(int.Parse(NavigationContext.QueryString["baby"])); } else { _vm.HandleEditBabyEvent(int.Parse(NavigationContext.QueryString["id"])); } } _vm.RegisterWizardEventHandler(_handler = new PropertyChangedEventHandler(HandleWizardPropertyChange)); }