예제 #1
0
        void WidgetKeyDownHandler(object sender, System.Windows.Input.KeyEventArgs e)
        {
            KeyEventArgs args;

            if (e.MapToXwtKeyArgs(out args))
            {
                Context.InvokeUserCode(delegate {
                    eventSink.OnKeyPressed(args);
                });
                if (args.Handled)
                {
                    e.Handled = true;
                }
            }
        }
예제 #2
0
 void HandlePreviewKeyUp(object sender, System.Windows.Input.KeyEventArgs e)
 {
     if (enabledEvents.HasFlag(WidgetEvent.KeyReleased))
     {
         Load(sender as FrameworkElement);
         KeyEventArgs args;
         if (e.MapToXwtKeyArgs(out args))
         {
             SetCurrentEventRow();
             ApplicationContext.InvokeUserCode(delegate
             {
                 EventSink.OnKeyReleased(args);
             });
             if (args.Handled)
             {
                 e.Handled = true;
             }
         }
     }
 }