Exemple #1
0
 /// <summary>
 ///     Called when a keyboard button is released.
 /// </summary>
 /// <param name="key">The key.</param>
 internal void OnInputKeyboardRelease(KeyboardKey key)
 {
     if (HasFocus)
     {
         KeyUp(this, new KeyboardEventArgs(key));
     }
     else
     {
         foreach (var control in Controls)
         {
             if (control.Enabled)
             {
                 control.OnInputKeyboardRelease(key);
             }
         }
     }
 }
Exemple #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="KeyboardEventArgs" /> class.
 /// </summary>
 /// <param name="key">The key.</param>
 public KeyboardEventArgs(KeyboardKey key)
 {
     Key = key;
 }
Exemple #3
0
 /// <summary>
 ///     Listens for keyboard button release.
 /// </summary>
 /// <param name="key">The key.</param>
 private void OnInputKeyboardReleased(KeyboardKey key)
 {
     if (!Transitioning)
     {
         if (focus != null)
         {
             focus.OnInputKeyboardRelease(key);
         }
     }
 }
Exemple #4
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="KeyboardEventArgs" /> class.
 /// </summary>
 /// <param name="time">The time.</param>
 /// <param name="key">The key.</param>
 public KeyboardEventArgs(double time, KeyboardKey key)
     : base(time)
 {
     Key = key;
 }