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

Bruce Bromberek bruce.bromberek at gmail.com
Tue Mar 9 05:48:12 CET 2010


I kept searching for XAML and enterkey which kept taking me to
PresentationCore.  But you are right, Key is in WindowsBase.  Adding a
reference fixed it for me.

On Mon, Mar 8, 2010 at 10:28 PM, Dino Viehland <dinov at microsoft.com> wrote:

>  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
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100308/958acd92/attachment.html>


More information about the Ironpython-users mailing list