示例#1
0
 private void AmountTextBox_OnKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         AmountTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
         IsEdited = false;
     }
 }
        private void AmountTextBox_LostFocus(object sender, RoutedEventArgs e)
        {
            AmountTextBox.IsReadOnly = true;

            BindingExpression exp = AmountTextBox.GetBindingExpression(TextBox.TextProperty);

            exp.UpdateSource();


            //  OnLostFocus();
        }
        private void AmountTextBox_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                BindingExpression exp = AmountTextBox.GetBindingExpression(TextBox.TextProperty);
                exp.UpdateSource();
                Keyboard.ClearFocus();
                // OnLostFocus();
                AmountTextBox.IsReadOnly = true;
                ExecuteCommand(EventsViewModel.CmdSaveInstrumentConfig);



                //Terminal.ViewModels.MarketViewModel mvm = (Terminal.ViewModels.MarketViewModel)this.DataContext;
                //mvm.
            }
        }
示例#4
0
 private void AmountTextBox_OnLostFocus(object sender, RoutedEventArgs e)
 {
     AmountTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
     IsEdited = false;
 }