Wednesday, April 22, 2009

WPF on IronPython: Windows and Dispatching

Two unrelated posts on working with WPF (Windows Presentation Foundation - the new .NET user interface library for Windows built on top of DirectX) and IronPython.
Like most UI toolkits WPF requires that interaction with components of the GUI be done on the same thread that they were created on. The WPF technique for communicating with the user interface from another thread involves using a dispatcher.

Jose Ramon Calzada discovers that Python decorators provide an ideal way of ensuring that functions or methods are invoked onto the UI thread.
A Japanese blog entry; as usual the code samples and screenshots speak for themselves, but there is always google translate (which does really odd things to the code samples however).

The blog entry takes you through creating and configuring simple windows and message boxes with WPF.

No comments:

Post a comment

Note: only a member of this blog may post a comment.