protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { // hack to always enable the Venue textbox if it has been disabled in the event the user clicks search while keyboard is showing this.BackKeyPress += EnableVenueTextBox; IDictionary <string, string> parameters = this.NavigationContext.QueryString; if (parameters.ContainsKey("DateId")) { DateId = Int32.Parse(parameters["DateId"]); } base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { SlideTransition transition = new SlideTransition(); transition.Mode = SlideTransitionMode.SlideRightFadeIn; PhoneApplicationPage page = (PhoneApplicationPage)((PhoneApplicationFrame)Application.Current.RootVisual).Content; ITransition trans = transition.GetTransition(page); trans.Completed += delegate { trans.Stop(); if (e.NavigationMode == NavigationMode.New) { ceDateViewModel = new CEDateViewModel(this, DateId); this.DataContext = ceDateViewModel; } }; trans.Begin(); } }
public FindVenueUserControl(CEDateView ceDateView, DialogService dialogService, ProgressIndicator progressIndicator) { InitializeComponent(); _ceDateView = ceDateView; _ceDateViewModel = (CEDateViewModel)_ceDateView.DataContext; _dialogService = dialogService; _progressIndicator = progressIndicator; }