[IronPython] IronPython and WPF .. too cool
ml.cyresse at gmail.com
Sat Oct 29 15:39:49 CEST 2005
I'd just to like take a wee moment to say "Hi", first post etc. After
hearing rumours about IronPython, I decided to actually find out what
the fuss about the whole .NET thing was, and IronPython seemed the
Must say, very impressed with the .NET shebang, and how simply
IronPython works with it.
It's great to learn a new framework while remaining within my comfort
zone, as I've only been coding a year, and solely in Python.
As of finding this advice from Jim Hugunin in the list's archive:
---- site.py ----
I am a very happy panda. Anyway, I was responding to the above post,
and I'd like to say thank you to the OP. I downloaded and had a look
at WFP/Avalon, or whatever it's properly called, and wow. Awesome.
Kudos to MS for a coherent and what looks to be incredibly powerful
GUI API. From my Python background I can only describe it as the ease
of use of Tkinter with the power of wxPython, although it'd probably
be better to say it's easier to use than Tkinter, and more powerful
than wxPython on a Win32 platform.
Out of curiosity, are there any docs for it yet? I managed to find
some brief introductions and a hitch-hiker's guide on MSDN... but with
some assumptions (and I'm also pleasantly surprised that WFP is quite
intuitive) and use of Reflector(www.aisto.com/roeder/dotnet/) I
managed to tweak a few things here and there, so I thought I'd post
them up for general consumption if there isn't any docs yet.
To change the font of the TextBlock -
txtElement.Text = "Look Ma, it's Courier New"
txtElement.FontFamily = FontFamily("Courier New") #or other installed font
And to add an icon or tooltip -
mainWindow.Icon = IconData("c:/games/RA2/RA2.ico")
mainWindow.ToolTip = "Yes, it's the Red Alert 2 icon..."
I think there's more than one way to specify the icon, but I chose the
There's a whole bunch of other font stuff too, FontStyle etc.
I also ran a dir() on the textblock, panel, and window objects, and
between them there's about 1500 attributes, but it's good to have a
browse and find a point to start guessing from.
More information about the Ironpython-users