Пример #1
0
        /////////////////////////////////////////////////////////////////////////////////////////////////////
        // 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);
            }
        }
Пример #2
0
 /// <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;
 }
Пример #3
0
 /// <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;
 }
Пример #4
0
 /// <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();
 }