Will there be a silverlight application support?

Mar 14, 2011 at 12:35 PM

The Silverlight IronPython Web Page is indeed quite nice, but I'm looking right now an IDE to write in IronPython a Silverlight application and then to debug it.
It is planned that this PTVS also supported?

Mar 14, 2011 at 10:43 PM

I'll open a feature request in the issue tracker.

Mar 30, 2011 at 4:36 PM

Hi proofy,

I've been working on something similar to what you are asking for.  In fact you can probably do it already using a little documented feature of Iron Python.  Just Create a new Silverlight web page project and add a folder to it.  Then add an "app.py" file to the folder.  The folder will be your .xap name and the app.py file the entry point.  To run it, add silverlight.js and an html page with an object tag pointing to <foldername.xap> (similar to what you get in the .web project of a normal silverliight application) in the root of the project, set the html file as the project start page and hit F5.

You can then set breakpoints and step through your app.py file.  One way to set the applications root visual element in app.py could be as follows:

import clr
from System.Windows import Application
from System.Windows.Controls import UserControl

rootControl = UserControl()

#use python code to add controls to rootControl
#or use System.Windows.Markup.XamlReader to read in .xaml 
#files dynamically.

Application.Current.RootVisual = RootControl()

When you are ready, you can use Chiron.exe to create the .xap for deployment.

Sorry, I haven't tested this exactly as my requirements are a bit different but something like that should work.

I'm not sure why there isn't a project template for this as its pretty simple and it took me aaaaaages to work it out as it doesn;t seem to be documented properly anywhere... :(




Mar 31, 2011 at 6:53 AM
Edited Mar 31, 2011 at 7:15 AM

I wrote a comment on the feature request as well: