private void AddCityInternal(AutoSuggestBoxSuggestionChosenEventArgs args) { var info = args.SelectedItem as CityInfo; if (info != null) { _navigation.Navigate(Experiences.Main.ToString(), null); _eventAggregator.GetEvent<AddCityMessage>().Publish(info); } }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { // Set sender.Text. You can use args.SelectedItem to build your text string. sender.Text = args.SelectedItem.ToString(); passedVars.Clear(); passedVars.Add(empID); passedVars.Add(sender.Text); //passedVars.Add("true"); Debug.WriteLine(sender.Text); ContentFrame.Navigate(typeof(Samples.SamplesView), passedVars); }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (((SampleDefinition)(args.SelectedItem)) == _dummySampleDefinition) { SearchBox.Text = ""; } else { MainNavigationViewModel.NavigateToSample((SampleDefinition)args.SelectedItem); } }
//Sugestao Selecionada Cidade private void AutoSuggestBox_SuggestionChosenCidade(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs e) { var itemselecionado = e.SelectedItem; autoCompleteCidade.Selecionado = $"Item Selecionado: {itemselecionado}"; nomeCidade = e.SelectedItem.ToString(); RegraForm(); //LimparTela(); //ValidacaoCampos(); }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (args.SelectedItem is Song song) { sender.Text = song.Name; } else if (args.SelectedItem is ArtistSearchResult.Artists art) { sender.Text = art.name; } }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { Deck selected = args.SelectedItem as Deck; string name = selected.Name; App.viewModel.selectDeck(selected); sender.Text = name; Frame mainFrame = Window.Current.Content as Frame; mainFrame.Navigate(typeof(CardPage)); }
private void suggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (sender.Tag.ToString() == "from") { request.from = args.SelectedItem as City; } else { request.to = args.SelectedItem as City; } }
private void StopChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (sender.Name == "From") { searchterm1 = args.SelectedItem.ToString(); } else { searchterm2 = args.SelectedItem.ToString(); } }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var disk = (Disk)args.SelectedItem; sender.Text = disk.DiskID.ToString(); if (selected.Contains(disk.DiskID)) { return; } selected.Add(disk.DiskID); }
private void NameBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { Debtor = args.SelectedItem as Customer; NameBox.Text = (args.SelectedItem as Customer).Name; AddressBox.Text = App.isAdminLoggedIn ? (args.SelectedItem as Customer).Address : "Direccion de " + (args.SelectedItem as Customer).Name; PhoneBox.Text = App.isAdminLoggedIn ? (args.SelectedItem as Customer).PhoneNumber : "Terminacion " + (args.SelectedItem as Customer).PhoneNumber.Substring(Math.Max(0, (args.SelectedItem as Customer).PhoneNumber.Length - 4)); NoteBox.Text = (args.SelectedItem as Customer).Notes; AddressBox.IsEnabled = false; PhoneBox.IsEnabled = false; NoteBox.IsEnabled = false; isReturningCustomer = true; }
private void carriersearch_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (args.SelectedItem != null) { selectedcarrier = (Carrier)args.SelectedItem; sender.Text = selectedcarrier.Address.Name; } else { // Use args.QueryText to determine what to do. } }
private void TxtSearch_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (args.SelectedItem is Product) { string productId = (args.SelectedItem as Product).Id; txtSearch.ItemsSource = null; AppShell.Current.NavCommand.Execute(new NavType() { Type = typeof(ViewProductPage), Parameter = productId }); } }
private void txtsearchbykeyword_SuggestionChosen(object sender, AutoSuggestBoxSuggestionChosenEventArgs e) { try { VM.AreaName = ((AreaModel)e.SelectedItem).areaName; AreaModel value = (AreaModel)e.SelectedItem; VM.SelectedArea(value.id); } catch (Exception ex) { } }
private void EndLocationAutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { Result r = args.SelectedItem as Result; Debug.Assert(r != null, "r != null"); _vm.EndPoint = new BasicGeoposition { Latitude = r.geometry.location.lat, Longitude = r.geometry.location.lng }; }
private void SearchBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (!args.SelectedItem.ToString().Equals("Ricerca...")) { SearchBox.Text = args.SelectedItem.ToString(); searchResults(); } else { SearchBox.Text = ""; } }
private void txtsearchbyroomname_SuggestionChosen(object sender, AutoSuggestBoxSuggestionChosenEventArgs e) { try { txtsearchbyroomname.Text = ((RoomNameList)e.SelectedItem).name; EntryName.Text = ((RoomNameList)e.SelectedItem).name + "/"; App.roomid = ((RoomNameList)e.SelectedItem).id; } catch (Exception ex) { } }
public async void TagChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { if (!AddedTags.Contains((string)args.SelectedItem)) { AddedTags.Add((string)args.SelectedItem); ProjectInputModel.TagNames.Add((string)args.SelectedItem); } }); }
private async void OnSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (sender.ItemsSource == _failedMessageItemSource) { sender.Text = string.Empty; return; } var suggestion = args.SelectedItem as LocationSuggestion; _currentRouteResult = await MapRouteFinder.GetDrivingRouteAsync(CurrentPosition, suggestion.Location.Point); switch (_currentRouteResult.Status) { case MapRouteFinderStatus.Success: FocusResult.Visibility = Visibility.Visible; NavigationLabel.Text = suggestion.Location.Address.Town; DescriptionLabel.Text = suggestion.Location.Description; var thing = await NavigationServices.GetPlaceMetaData(suggestion.Location.Address.Town); break; case MapRouteFinderStatus.UnknownError: break; case MapRouteFinderStatus.InvalidCredentials: break; case MapRouteFinderStatus.NoRouteFound: break; case MapRouteFinderStatus.NoRouteFoundWithGivenOptions: break; case MapRouteFinderStatus.StartPointNotFound: break; case MapRouteFinderStatus.EndPointNotFound: break; case MapRouteFinderStatus.NoPedestrianRouteFound: break; case MapRouteFinderStatus.NetworkFailure: sender.ItemsSource = "No internet connection"; break; case MapRouteFinderStatus.NotSupported: break; } }
private void SearchText_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var viewModel = (HallPageViewModel)DataContext; int a; for (a = 0; a < viewModel.MissionCollection.Count; a++) { if (viewModel.MissionCollection[a].MissionName == args.SelectedItem) { viewModel.SelectedMission = viewModel.MissionCollection[a]; } } }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { string selectedItem = args.SelectedItem.ToString(); if (selectedItem != Strings.Resources.AccountCodePageSearchNotFound) { ViewModel.TwoFADataService.ACVCollection.Filter = x => ((TwoFACodeModel)x).Label == selectedItem; } else { sender.Text = string.Empty; } }
/// <summary> /// 搜索框选择事件 /// </summary> private void SearchAutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var suggestBoxItem = args.SelectedItem as SuggestBoxItem; if (suggestBoxItem == null) { return; } var extraData = new[] { suggestBoxItem.SourcePath, suggestBoxItem.Picture, suggestBoxItem.Category }; AutoSuggestNavigate(extraData); SearchAutoSuggestBox.Text = ""; }
private async void PickPlaceComboBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { Place selectedPlace = (args.SelectedItem as Place); selectedEvent.Text = selectedPlace.address.ToString(); EventsList.Clear(); var events = await EventHelper.GetEvents(selectedPlace.id); foreach (var eventVar in events) { EventsList.Add(eventVar); } }
private void suggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { switch (sender.Tag.ToString()) { case "from": trainRequest.from = args.SelectedItem as City; break; case "to": trainRequest.to = args.SelectedItem as City; break; } }
private async void DefaultLocation_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (args.SelectedItem != null) { var selected = args.SelectedItem as SinglePlace; var result = (await PlacesSearch.PlaceDetails(selected.PlaceId)); PlaceInfo _PlaceInfo = new PlaceInfo() { Latitude = result.result.geometry.location.lat, Longitude = result.result.geometry.location.lng, DisplayName = result.result.FormmatedName, PlaceId = selected.PlaceId }; ChoosenPlace = _PlaceInfo; } }
private void LabelsAutoSuggestBox_OnSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var selectedLabel = args.SelectedItem as Label; var text = LabelsAutoSuggestBox.Text; if (!string.IsNullOrWhiteSpace(text) && text[text.Length - 1] != ',') { LabelsAutoSuggestBox.Text += $",{selectedLabel.Name}"; } else { LabelsAutoSuggestBox.Text += $"{selectedLabel.Name}"; } }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { try { // Set sender.Text. You can use args.SelectedItem to build your text string. sender.Text = args.SelectedItem as string; selectedCurrency = args.SelectedItem as string; buttonAddAmount.IsEnabled = true; } catch { sender.Text = ""; selectedCurrency = null; } }
private void ContactAutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs e) { if (sender.Text != "") { int index = contactNameList.IndexOf(sender.Text); if (index == -1) { return; } sender.Text = contactsSQLite[index].Fullname; AddressEntry.Text = contactsSQLite[index].Address; CityEntry.Text = contactsSQLite[index].City; } }
private void WeatherCityList_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var continents = args.SelectedItem as CityInfo; CityId = continents.id; foreach (var item in CitySuggestion) { if (CityId == item.id) { sender.Text = item.cityZh; } } WeatherCityList.ItemsSource = NoCitySuggestion; }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var item = args.SelectedItem; if (item is string) { sender.Text = ""; return; } this.gridView.SelectedItem = item; this.gridView.MakeVisible(new SemanticZoomLocation { Item = item }); }
private async void SearchSourceBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (!IsInternet()) { await new MessageDialog("Seems you are not connected to the Internet").ShowAsync(); return; } else { _source = args.SelectedItem.ToString(); flag = 1; progress.IsActive = true; //string dlat, dlng, token; var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; token = localSettings.Values["Token"].ToString(); GeoResponse location; CabsAPI api = new CabsAPI(); location = await api.GeoCodingResult(token, args.SelectedItem.ToString()); if (location.Code == ResponseCode.SUCCESS) { slat = location.Position.Latitude; slng = location.Position.Longitude; BasicGeoposition curPos = new BasicGeoposition(); curPos.Latitude = double.Parse(slat); curPos.Longitude = double.Parse(slng); await MyMap.TrySetViewAsync(new Geopoint(curPos), 17D); AddMapIcon(double.Parse(slat), double.Parse(slng)); CabsResponse response = await api.GetNearbyCabs(slat, slng, Token); if (response.Code == ResponseCode.SUCCESS) { progress.IsActive = false; CabsListView.ItemsSource = response.Cabs; } else { await new MessageDialog("Error fetching nearby cabs").ShowAsync(); return; } } else { await new MessageDialog("Error retrieving Geoposition coordinates").ShowAsync(); return; } } }
private void IngredientList_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { // Set sender.Text. You can use args.SelectedItem to build your text string. if (args.SelectedItem != null) { if ((string)args.SelectedItem != "No results") { sender.Text = args.SelectedItem as string; } else { sender.Text = ""; } } }
/// <summary> /// Automates the suggest box search room_ on suggestion chosen. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="AutoSuggestBoxSuggestionChosenEventArgs" /> instance containing the event data.</param> private async void AutoSuggestBoxSearchRoom_OnSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { //room selected string room = args.SelectedItem as string; ImageCanvas.Width = MainGrid.ActualWidth - 100; ImageCanvas.Height = MainGrid.ActualHeight - 100; BitmapImage roomImage = await MapSearcher.GetRoomImageAsync(room); if (roomImage == null) { return; } DisplayImage(roomImage, ImageCanvas.Width, ImageCanvas.Height); }
private void autoBox_Search_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { sender.Text = args.SelectedItem.ToString(); getData(sender.Text); }
private void alimentInput_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { selectedAliment = (Aliment)args.SelectedItem; sender.Text = selectedAliment.alimentname; Debug.WriteLine("Selected aliment : " + selectedAliment.alimentname + " glucides = " + selectedAliment.Glucides); }
/// <summary> /// This event gets fired as the user keys through the list, or taps on a suggestion. /// This allows you to change the text in the TextBox to reflect the item in the list. /// Alternatively you can use TextMemberPath. /// </summary> /// <param name="sender">The AutoSuggestBox that fired the event.</param> /// <param name="args">The args contain SelectedItem, which contains the data item of the item that is currently highlighted.</param> private void AutoSuggestName_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { //var contact = args.SelectedItem as Contact; //sender.Text = string.Format("{0} ({1})", contact.FullName, contact.Company); }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { // Set sender.Text. You can use args.SelectedItem to build your text string. tmp.Text = sender.Text; }
private void ToStationBox_OnSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { (this.DataContext as SheduleWizardViewModel).ToStation = args.SelectedItem as StationResponse; }
private void AddToPortfolio_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { pageModel.AddToPortfolio_SuggestionChosen(sender, args); }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var hit = (PackagesResult.Hit)args.SelectedItem; SearchWebView.Navigate(new Uri("http://localhost:8671/api/packages/" + hit.objectID)); }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var newItem = new Item(args.SelectedItem as string); ViewModel.Add(newItem); this.NewItem.Text = ""; }
/// <summary> /// This event gets fired as the user keys through the list, or taps on a suggestion. /// This allows you to change the text in the TextBox to reflect the item in the list. /// Alternatively you can use TextMemberPath. /// </summary> /// <param name="sender">The AutoSuggestBox that fired the event.</param> /// <param name="args">The args contain SelectedItem, which contains the data item of the item that is currently highlighted.</param> private void asb_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var contact = (Contact)args.SelectedItem; sender.Text = contact.DisplayName; }
private void SuggestBoxSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (_listChampsRecherche.SelectedItem != null) { var searchValue = args.SelectedItem.GetType() .GetProperty(_listChampsRecherche.SelectedItem.ToString()) .GetValue(args.SelectedItem) .ToString() .ToLower(); var results = ToList()? .Where( o => o.GetType() .GetProperty(_listChampsRecherche.SelectedItem.ToString()) .GetValue(o) .ToString().ToLower() .Contains(searchValue)); if (results != null && results.Any()) { SetItemsSourceToListView(results.ToList()); } } }
private void SearchBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { SearchBox.TextChanged -= SearchBox_TextChanged; // Set sender.Text. You can use args.SelectedItem to build your text string. sender.Text = (args.SelectedItem as CityInfo).City; SearchBox.TextChanged += SearchBox_TextChanged; }
/// <summary> /// This event gets fired as the user keys through the list, or taps on a suggestion. /// This allows you to change the text in the TextBox to reflect the item in the list. /// Alternatively you can use TextMemberPath. /// </summary> /// <param name="sender">The AutoSuggestBox that fired the event.</param> /// <param name="args">The args contain SelectedItem, which contains the data item of the item that is currently highlighted.</param> private void Control2_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var control = args.SelectedItem as ControlInfoDataItem; //Don't autocomplete the TextBox when we are showing "no results" if(control != null) { sender.Text = control.Title; } }
public void SearchChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var value = args.SelectedItem as Trip.All; this.SearchItem = value.Bob.User.ToString(); Search(); }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { tbox_group.TextChanged -= AutoSuggestBox_TextChanged; var searchStr = tbox_group.Text.Replace(GroupDB.SEPARATE_TOKEN_TEMP, GroupDB.SEPARATE_TOKEN); var index = searchStr.LastIndexOf(GroupDB.SEPARATE_TOKEN); var result = searchStr.Substring(0, index + 1); tbox_group.Text = result + args.SelectedItem.ToString(); }
private void DetailsArtistSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { _currentlyEditedItem.tagArtist = args.SelectedItem.ToString(); }
private void SuggestionsSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { Suggestions.Text = args.SelectedItem.ToString(); }
private void ui_search_autosuggestboxTo_OnSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var selectedStation = args.SelectedItem as StopLocation; //get stoplocation if (selectedStation == null) { return; } ui_search_autosuggestboxTo.Text = selectedStation.name; //change fromStation text to current selected stop location name. _toId = selectedStation.id; //change _fromId to selected station id for future use. IsReadyForSearch(); }
public void SearchChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var value = args.SelectedItem as Party; this.SearchItem = value.Name; Search(); }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { AutoSuggestBox box = sender as AutoSuggestBox; MapLocation item = (MapLocation)args.SelectedItem; Debug.WriteLine(item.Point.Position.Latitude + " " + item.Point.Position.Longitude + " " + item.Point.Position.Altitude); locations.Add(item.Point.Position); DrawRoute(); }
private void FromStationText_OnSuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { var selectedStation = args.SelectedItem as StopLocation; //get stoplocation if (selectedStation == null) { return; } fromStationText.Text = selectedStation.name; //change fromStation text to current selected stop location name. FromId = selectedStation.id; //change FromId to selected station id for future use. }
private void searchBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { searchBox.Text = searchBox.Text.Remove(searchBox.Text.LastIndexOf(searchBoxTagSeparator) + 1); searchBox.Text = searchBox.Text + "\"" + ((Common.Model.Tag)args.SelectedItem).name + "\"" + searchBoxTagSeparator; }
private async void SearchText_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { //this is the selection of item string item = ((Facet)args.SelectedItem).DisplayName; Task<List<Article>> task = getArticles(item); Articles = await task; articlesGrid.ItemsSource = Articles; }
private void suggestions_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { suggestions.Text = "Choosen"; }
private void Suggest_Chosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { if (args.SelectedItem.ToString() == "Зарплата") { IncomeBox.SelectedIndex = 0; IncomeBox.IsEnabled = false; } else if (args.SelectedItem.ToString() == "Телефон" || args.SelectedItem.ToString() == "Одежда" || args.SelectedItem.ToString() == "Интернет" || args.SelectedItem.ToString() == "Еда" || args.SelectedItem.ToString() == "Развлечения" || args.SelectedItem.ToString() == "Транспорт" ) { IncomeBox.SelectedIndex = 1; IncomeBox.IsEnabled = false; } else IncomeBox.IsEnabled = true; var x = new ObservableCollection<Category>(GetFakeRuntimeItems()); foreach (var cut in x) { if (args.SelectedItem.Equals(cut)) { AutoSuggestBox.Text = cut.name; } } }
private async void asbCity_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { asbCity.Text = ""; string cityname = args.SelectedItem.ToString(); if (!string.IsNullOrEmpty(cityname)) { bool isSuccess = await UpdateUserCity(cityname); if (isSuccess) { if (Frame.CanGoBack) { Frame.GoBack(); return; } else { Frame.Navigate(typeof(MainPage)); return; } } } }
/// <summary> /// Fired when the user selects a suggestion. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void SubredditSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { ui_subredditSuggestBox.Text = (string)args.SelectedItem; ui_subredditSuggestBox.ItemsSource = null; }
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) { ShowItem(args.SelectedItem as SampleDataModel); }