private void ButtonGotoProfileOnClick(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(GotoUserName.Text)) { return; } GotoFlyout.Hide(); ViewModelLocator.NavMgr.RegisterBackNav(MobileViewModelLocator.ProfilePage.PrevArgs); ViewModelLocator.GeneralMain.Navigate(PageIndex.PageProfile, new ProfilePageNavigationArgs { TargetUser = GotoUserName.Text }); GotoUserName.Text = ""; }
private void SearchBox_OnQuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args) { if (string.IsNullOrEmpty(GoToInputBox.Text)) { return; } GotoFlyout.Hide(); ViewModelLocator.NavMgr.RegisterBackNav(DesktopViewModelLocator.ProfilePage.PrevArgs); ViewModelLocator.GeneralMain.Navigate(PageIndex.PageProfile, new ProfilePageNavigationArgs { TargetUser = GoToInputBox.Text }); GoToInputBox.Text = ""; }
private void GotoUserName_OnKeyDown(object sender, KeyRoutedEventArgs e) { if (e.Key == VirtualKey.Enter) { if (string.IsNullOrEmpty(GotoUserName.Text)) { return; } GotoFlyout.Hide(); ViewModelLocator.NavMgr.RegisterBackNav(MobileViewModelLocator.ProfilePage.PrevArgs); ViewModelLocator.GeneralMain.Navigate(PageIndex.PageProfile, new ProfilePageNavigationArgs { TargetUser = GotoUserName.Text }); GotoUserName.Text = ""; e.Handled = true; } }