private void MyTextBox_ValidateKey(object sender, ValidateKeyEventArgs e)
		{
			QuantifiedTextViewModel vm = DataContext as QuantifiedTextViewModel;
			if (vm != null)
				e.IsValid =
					e.TextKey != vm.CultureTextVM.TextKeyVM.TextKey &&
					vm.CultureTextVM.TextKeyVM.MainWindowVM.TextKeys.ContainsKey(e.TextKey);
		}
        private bool DoValidateKey(string textKey)
        {
            var e       = new ValidateKeyEventArgs(textKey);
            var handler = ValidateKey;

            if (handler != null)
            {
                handler(this, e);
            }
            return(e.IsValid);
        }
 private bool DoValidateKey(string textKey)
 {
     var e = new ValidateKeyEventArgs(textKey);
     var handler = ValidateKey;
     if (handler != null)
     {
         handler(this, e);
     }
     return e.IsValid;
 }
 private void DecoratedTextBox_ValidateKey(object sender, ValidateKeyEventArgs args)
 {
     args.IsValid = MainViewModel.Instance.TextKeys.ContainsKey(args.TextKey);
 }