private void HandleProviderKeyPressEvent (object o, KeyEventArgs args)
		{
			if (FocusedElement == null)
				return;
			
			RaisePreviewKeyPressEvent (args);
			RaiseKeyPressEvent (args);			
		}	
		private void HandleKeyPressEvent (object o, KeyEventArgs args)
		{
			if (!NeedToProcess (args.Key))
				return;

			if (Region.InsertCharacterCommand != null) {
				Region.InsertCharacterCommand.Execute (args.Key);
			}
		}
		private void HandleKeyPressEvent (object o, KeyEventArgs args)
		{
			switch (args.Key) {
			case Key.LeftShift:
			case Key.RightShift:
				Modifiers |= ModifierKeys.Shift;
				break;
			}

			if (FocusedElement == null)
				return;
			
			RaisePreviewKeyPressEvent (args);
			RaiseKeyPressEvent (args);			
		}
		private void RaiseKeyPressEvent (KeyEventArgs args)
		{
			if (FocusedElement == null)
				return;

			KeyPressEvent.RaiseEvent (FocusedElement, args);
		}
		private void HandleKeyReleaseEvent (object sender, KeyEventArgs args)
		{
			switch (args.Key) {
			case Key.LeftShift:
			case Key.RightShift:
				Modifiers ^= ModifierKeys.Shift;
				break;
			}
		}
Exemple #6
0
		private void HandlePreviewKeyPressEvent (object o, KeyEventArgs args)
		{
			ProcessKey ();
		}
		private void RaiseKeyPressEventHandler (KeyEventArgs args)
		{
			if (KeyPressEvent != null) {
				KeyPressEvent (this, args);
			}
		}
		private void RaisePreviewKeyPressEvent (KeyEventArgs args)
		{
			if (PreviewKeyPressEvent != null) {
				PreviewKeyPressEvent (this, args);
			}
		}
		protected virtual void OnKeyPressEvent (object o, KeyEventArgs args)
		{
			var commands = InputBindings.Where (ib => ib.Command != null && ib.Gesture.Matches (args.Key, Keyboard.Modifiers)).Select (ib => ib.Command);

			foreach (var command in commands) {
				command.Execute (null);
			}

			RaiseKeyPressEvent (args);
		}
		protected virtual void OnPreviewKeyPressEvent (object o, KeyEventArgs args)
		{
			RaisePreviewKeyPressEvent (args);
		}
		private void RaiseKeyReleaseEvent (KeyEventArgs args)
		{
			if (KeyReleaseEvent != null) {
				KeyReleaseEvent (this, args);
			}
		}