///////////////////////////////////////////////////////////////////////////////////////////////////// // PUBLIC PROCEDURES ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Occurs when the end user submits a text entry, generally by pressing <c>Enter</c>. /// </summary> /// <param name="e">The <c>AutoCompleteBoxEventArgs</c> that contains the event data.</param> protected override void OnSubmitted(AutoCompleteBoxEventArgs e) { var productItemInfo = e.Item as ProductItemInfo; if (productItemInfo != null) { this.ViewModel.NavigateViewToItemInfo(productItemInfo, TransitionDirection.Forward); } }
/// <summary> /// Occurs when a suggested item is chosen and needs to be converted to text. /// </summary> /// <param name="e">The <c>AutoCompleteBoxEventArgs</c> that contains the event data.</param> protected override void OnSuggestionChosen(AutoCompleteBoxEventArgs e) { e.Text = string.Empty; }
/// <summary> /// Occurs when the end user submits a text entry, generally by pressing <c>Enter</c>. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The <c>AutoCompleteBoxEventArgs</c> that contains data related to the event.</param> private void OnTextBoxSubmitted(object sender, AutoCompleteBoxEventArgs e) { MessageBox.Show(String.Format("\"{0}\" was submitted.", e.Text), "Text Submitted"); textBox.Text = String.Empty; }
/// <summary> /// Occurs when the <c>Text</c> is changed. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The <c>AutoCompleteBoxEventArgs</c> that contains data related to the event.</param> private void OnQuickLaunchBoxTextChanged(object sender, AutoCompleteBoxEventArgs e) { this.UpdateQuickLaunchItemsSource(); }