[IronPython] How to reference enumeration in System.Windows.Input

Dino Viehland dinov at microsoft.com
Tue Mar 9 05:28:42 CET 2010


Has Key moved from WindowsBase to PresentationCore?   I'm not familiar with WPF but the docs says it's in WB: http://msdn.microsoft.com/en-us/library/system.windows.input.key.aspx

If it has genuinely moved, is now type forwarded, and we're not picking it up my suggestion would be to add a reference to both assemblies.  If it hasn't moved we probably need a test which shows that type forwarded types are available - I'm hoping reflection will do that.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bruce Bromberek
Sent: Monday, March 08, 2010 8:20 PM
To: Discussion of IronPython
Subject: [IronPython] How to reference enumeration in System.Windows.Input

I can't seem to figure out how to add a reference to System.Windows.Input now that it is part of the PresentationCore assembly.  Specifically I'm trying to check for the enterkey, but I'm forced to do this:

if str(e.Key) == "Return":

instead of

if e.Key == Key.Enter:


I'm using Ironpython 2.6.1 RC1 with .Net 3.5.


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100309/50350df0/attachment.html>


More information about the Ironpython-users mailing list