carlosalberto/xwt — comment on commit b3c5c6efe842d1e19ba31a78ce900702441c4543
File: Xwt.WPF/Xwt.WPFBackend/WidgetBackend.cs line 189
By slluis:

There is a new rule for backends: calls to the "user space" (that is, calling methods through the event sink) must be done using Toolkit.Invoke. This method takes a delegate and protects the invoker against unhandled exceptions. The method returns false if something failed. So this method would be implemented like this:

KeyEventArgs args;
if (MapToXwtKeyArgs (e, out args)) {
Toolkit.Invoke (delegate {
eventSink.OnKeyPressed (args);
)
}

I know, I have to document all this...