<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<base href="http://www.voidspace.org.uk/python/weblog/index.shtml" />
<title>IronPython & Silverlight 2 Tutorial with Demos and Downloads</title>
    <style type="text/css">
        p, td, li, ul, ol, h1, h2, h3, h4, h5, h6  {
            font-family: Georgia, "New Century Schoolbook",
            Times, serif;
            }

        q {
            font-style:italic;
        }
        
        hr {text-align: center;}
        
        acronym {
          border-bottom: 2px dotted black;
        }
            
        a:hover {background:yellow;}
        a[name]:hover {background: none;}

        .pysrc {
            BORDER-RIGHT: #c0c0ff 1px dotted; BORDER-TOP: #c0c0ff 1px dotted; FONT-WEIGHT: normal; 
            BACKGROUND: #e0e0ff; MARGIN: 20px; BORDER-LEFT: #c0c0ff 1px dotted; BORDER-BOTTOM: #c0c0ff 1px dotted;
             padding:10px;
        }
        .pykeyword {
                FONT-WEIGHT: bold;
                COLOR: orange;
        }
        .pystring {
                COLOR: green
        }
        .pycomment {
                COLOR: red
        }
        .pynumber {
            COLOR:black;
        }
        .pyoperator {
            COLOR:black;
        }
        .pytext {
            COLOR:purple;
        }
        /*
        :Author: David Goodger
        :Contact: goodger@users.sourceforge.net
        :Date: $Date: 2004/12/22 19:08:26 $
        :Version: $Revision: 1.46 $
        :Copyright: This stylesheet has been placed in the public domain.
        
        Default cascading style sheet for the HTML output of Docutils.
        */
        
        /* "! important" is used here to override other ``margin-top`` and
           ``margin-bottom`` styles that are later in the stylesheet or 
           more specific.  See <http://www.w3.org/TR/CSS1#the-cascade>. */
        .first {
          margin-top: 0 ! important }
        
        .last {
          margin-bottom: 0 ! important }
        
        .hidden {
          display: none }
        
        a.toc-backref {
          text-decoration: none ;
          color: black }
        
        blockquote.epigraph {
          margin: 2em 5em ; }
        
        dl.docutils dd {
          margin-bottom: 0.5em }
        
        /* Uncomment (and remove this text!) to get bold-faced definition list terms
        dl.docutils dt {
          font-weight: bold }
        */
        
        div.abstract {
          margin: 2em 5em }
        
        div.abstract p.topic-title {
          font-weight: bold ;
          text-align: center }
        
        div.admonition, div.attention, div.caution, div.danger, div.error,
        div.hint, div.important, div.note, div.tip, div.warning {
          margin: 2em ;
          border: medium outset ;
          padding: 1em }
        
        div.admonition p.admonition-title, div.hint p.admonition-title,
        div.important p.admonition-title, div.note p.admonition-title,
        div.tip p.admonition-title {
          font-weight: bold ;
          font-family: sans-serif }
        
        div.attention p.admonition-title, div.caution p.admonition-title,
        div.danger p.admonition-title, div.error p.admonition-title,
        div.warning p.admonition-title {
          color: red ;
          font-weight: bold ;
          font-family: sans-serif }
        
        /* Uncomment (and remove this text!) to get reduced vertical space in
           compound paragraphs.
        div.compound .compound-first, div.compound .compound-middle {
          margin-bottom: 0.5em }
        
        div.compound .compound-last, div.compound .compound-middle {
          margin-top: 0.5em }
        */
        
        div.dedication {
          margin: 2em 5em ;
          text-align: center ;
          font-style: italic }
        
        div.dedication p.topic-title {
          font-weight: bold ;
          font-style: normal }
        
        div.figure {
          margin-left: 2em }
        
        div.footer, div.header {
          font-size: smaller }
        
        div.line-block {
          display: block ;
          margin-top: 1em ;
          margin-bottom: 1em }
        
        div.line-block div.line-block {
          margin-top: 0 ;
          margin-bottom: 0 ;
          margin-left: 1.5em }
        
        div.sidebar {
          margin-left: 1em ;
          border: medium outset ;
          padding: 1em ;
          background-color: #ffffee ;
          width: 40% ;
          float: right ;
          clear: right }
        
        div.sidebar p.rubric {
          font-family: sans-serif ;
          font-size: medium }
        
        div.system-messages {
          margin: 5em }
        
        div.system-messages h1 {
          color: red }
        
        div.system-message {
          border: medium outset ;
          padding: 1em }
        
        div.system-message p.system-message-title {
          color: red ;
          font-weight: bold }
        
        div.topic {
          margin: 2em }
        
        h1.title {
          text-align: center }
        
        h2.subtitle {
          text-align: center }
        
        hr.docutils {
          width: 75% }
        
        ol.simple, ul.simple {
          margin-bottom: 1em }
        
        ol.arabic {
          list-style: decimal }
        
        ol.loweralpha {
          list-style: lower-alpha }
        
        ol.upperalpha {
          list-style: upper-alpha }
        
        ol.lowerroman {
          list-style: lower-roman }
        
        ol.upperroman {
          list-style: upper-roman }
        
        p.attribution {
          text-align: right ;
          margin-left: 50% }
        
        p.caption {
          font-style: italic }
        
        p.credits {
          font-style: italic ;
          font-size: smaller }
        
        p.label {
          white-space: nowrap }
        
        p.rubric {
          font-weight: bold ;
          font-size: larger ;
          color: maroon ;
          text-align: center }
        
        p.sidebar-title {
          font-family: sans-serif ;
          font-weight: bold ;
          font-size: larger }
        
        p.sidebar-subtitle {
          font-family: sans-serif ;
          font-weight: bold }
        
        p.topic-title {
          font-weight: bold }
        
        pre.address {
          margin-bottom: 0 ;
          margin-top: 0 ;
          font-family: serif ;
          font-size: 100% }
        
        pre.line-block {
          font-family: serif ;
          font-size: 100% }
        
        pre.literal-block, pre.doctest-block {
          margin-left: 2em ;
          margin-right: 2em ;
          background-color: #eeeeee }
        
        span.classifier {
          font-family: sans-serif ;
          font-style: oblique }
        
        span.classifier-delimiter {
          font-family: sans-serif ;
          font-weight: bold }
        
        span.interpreted {
          font-family: sans-serif }
        
        span.option {
          white-space: nowrap }
        
        span.option-argument {
          font-style: italic }
        
        span.pre {
          white-space: pre }
        
        span.problematic {
          color: red }
        
        table.citation {
          border-left: solid thin gray }
        
        table.docinfo {
          margin: 2em 4em }
        
        table.docutils {
          margin-top: 0.5em ;
          margin-bottom: 0.5em }
        
        table.footnote {
          border-left: solid thin black }
        
        table.docutils td, table.docutils th,
        table.docinfo td, table.docinfo th {
          padding-left: 0.5em ;
          padding-right: 0.5em ;
          vertical-align: top }
        
        th.docinfo-name, th.field-name {
          font-weight: bold ;
          text-align: left ;
          white-space: nowrap }
        
        h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
        h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
          font-size: 100% }
        
        tt.docutils {
          background-color: #eeeeee }
        
        ul.auto-toc {
          list-style-type: none }
        
        /*
        
        Additions when used with the Techie Blog
        
        */
        
        .bloganchor {
            font-size: 12px;
            float: right;
            margin-top: 0px;
            margin-right: 10px;
        }
        
        .entryfoot {
            font-size: 12px;
        }        
    </style>
</head>
<body>

<h2>IronPython & Silverlight 2 Tutorial with Demos and Downloads</h2>

<!-- ReST -->
<p><img src="/emoticons/clock.gif" alt="emoticon:clock" /> Instead of posting my PyCon talk slides, I've turned them into a series of articles instead, which should be easier to follow. All the examples are available online and for download. This is everything you need to get started with IronPython and Silverlight 2.  <img src="/smilies/smile.gif" alt="Smile" height="15" width="15" /> </p>
<p>All the articles, demos and downloads can be found at: <a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/index.shtml">Voidspace IronPython and Silverlight Pages</a>.</p>
<p>You can experiment online with the <a class="reference external" href="http://www.voidspace.org.uk/ironpython/webide/webide.html">IronPython &amp; Silverlight Web IDE</a>.</p>
<p>There is also a prototype of my <a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/interactive.shtml">Interactive Python Interpreter in the Browser</a>. Due to a bug in the <em>current</em> Dynamic Silverlight binaries it can't handle indented blocks. I expect Dino will be able to post fixed binaries soon. If you want to help me make the Javascript cross-browser then get in touch! (Currently it is safari only I think.)</p>
<h3>The Articles</h3><p>These articles will take you through everything you need to know to write Silverlight applications with IronPython:</p>
<ul>
<li><p class="first"><a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/introduction.shtml">Introduction to IronPython &amp; Silverlight 2</a></p>
</li>
<li><p class="first"><a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/silverlight_application.shtml">The Structure and Contents of a Dynamic Silverlight Application</a></p>
</li>
<li><p class="first"><a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/minimal.shtml">Getting Started: Minimal Examples of IronPython and Silverlight</a></p>
</li>
<li><p class="first"><a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/silverlight_api.shtml">The Silverlight APIs</a></p>
<blockquote>
<p>Exploring the Core-CLR that comes with Silverlight. This includes accessing the browser DOM, working with XAML, creating controls, the video player, accessing server resources, using local storage and more.</p>
</blockquote>
</li>
<li><p class="first"><a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/scriptable.shtml">From Silverlight to Javascript and Back Again</a></p>
<blockquote>
<p>Interacting with Javascript from IronPython code is easy, but needs a bit of C#. This article shows you how to do it - including compiling the C# from the command line (without Visual Studio installed).</p>
</blockquote>
</li>
<li><p class="first"><a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/embedding_ironpython.shtml">Embedding IronPython in a C# Silverlight Application</a></p>
</li>
<li><p class="first"><a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight/interactive.shtml">Interactive Python Interpreter in the Browser</a></p>
<blockquote>
<p>An interactive Python interpreter that runs in the browser, inside an HTML textarea. Great for documentation and tutorials where you can try the code in the browser.</p>
</blockquote>
</li>
</ul>
<h3>Downloads & Online Examples</h3><p>You can download several of the examples used in the articles:</p>
<ul class="simple">
<li><a class="reference external" href="http://www.voidspace.org.uk/ironpython/minimal/index.html">View Minimal IronPython Example 1 Online (with XAML)</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=MinimalIronPythonProject.zip">Download Minimal IronPython Example 1</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/ironpython/minimal2/index.html">View Minimal IronPython Example 2 Online (pure-Python)</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=MinimalIronPythonProject2.zip">Download Minimal IronPython Example 2</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/ironpython/controls/index.html">View IronPython Controls Example 1 Online (from XAML)</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk//cgi-bin/voidspace/downman.py?section=python&amp;file=IronPython-Controls.zip">Download IronPython Controls Example 1</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/ironpython/controls2/index.html">View IronPython Controls Example 2 Online</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=IronPython-Controls2.zip">Download IronPython Controls Example 2</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/ironpython/animation/index.html">View Simple Animation Example Online</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=IronPython-animation.zip">Download Simple Animation Example</a></li>
</ul>
<p>The easiest way of experimenting with the Silverlight APIs is through the Web IDE:</p>
<ul class="simple">
<li><a class="reference external" href="http://www.voidspace.org.uk/ironpython/webide/webide.html">View IronPython &amp; Silverlight Web IDE Online</a>.</li>
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=webide.zip">Download IronPython &amp; Silverlight Web IDE 0.5.0</a>.</li>
</ul>
<p>The following downloads use C#:</p>
<ul class="simple">
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=ScriptableProject.zip">Visual Studio 2008 Project Using the Scriptable Attributes</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=csl.bat">Compiling C# from the Command Line (batch file)</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=EmbeddedWithCodeBehind.zip">Embedded IronPython Project</a></li>
</ul>
<p>One of the most exciting things about Silverlight 2 is the possibility of embedding an interactive interpreter inside web pages:</p>
<ul class="simple">
<li><a class="reference external" href="http://www.voidspace.org.uk/ironpython/silverlight-console/console.html">View Interactive Interpreter Online</a></li>
<li><a class="reference external" href="http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?section=python&amp;file=interpreter.zip">Download Interactive Interpreter</a></li>
</ul>
<p>If you find any bugs, typos or missing links then please let me know.</p>


<p class="entryfoot">
    Posted by <strong>Fuzzyman</strong> on 2008-03-22 19:03:34.
    <br />
Categories: 
<a href="http://www.voidspace.org.uk/python/weblog/arch_Writing.shtml">Writing</a>, <a href="http://www.voidspace.org.uk/python/weblog/arch_Python.shtml">Python</a>, <a href="http://www.voidspace.org.uk/python/weblog/arch_IronPython.shtml">IronPython</a>

    <br />
    Visit the <a href="http://www.voidspace.org.uk/python/weblog/index.shtml">Voidspace Techie Blog</a> to read this entry and more.
    
</p>

</body>
</html>