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; } } }
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; } } } }