Esempio n. 1
0
        private void AssociatedObject_TextInput(object sender, TextCompositionEventArgs e)
        {
            if (string.IsNullOrEmpty(TriggerChar))
            {
                return;
            }

            var text = e.Text;

            if (text.StartsWith(TriggerChar, StringComparison.Ordinal))
            {
                AutoCompletePopup.IsOpen = true;
                AutoCompleteBox.Focus();
                HintAssist.SetHint(AutoCompleteBox, TriggerChar);
                AutoCompleteBox.Text = string.Empty;
                e.Handled            = true;
            }
        }
Esempio n. 2
0
 private void InputBox_KeyDown(object sender, KeyEventArgs e)
 {
     lastSelectionStart = InputBox.SelectionStart;
     if (e.Key == Key.Enter)
     {
         if (AutoCompleteBox.Items.Count != 0)
         {
             if (AutoCompleteBox.Focus())
             {
                 AutoCompleteBox.SelectedIndex = 0;
             }
         }
         else
         {
             CalcButton_Click(sender, e);
         }
     }
 }
Esempio n. 3
0
 void layoutRoot_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     _valueText.Focus();
 }