Creating a Silverlight Application with MindManager

As I mentioned in an earlier post, I have been playing around with Silverlight and trying to see how it could work with Mindjet MindManager maps.  Because both MindManager and Silverlight are based in XML, it is fairly straightforward to transform the MindManager XML to Silverlight XML (called XAML) using XSLT.  Since then, I have been working on adding some additional functionality to my XSLT transform to add images, zooming, panning, and video playback.

Yesterday at Mix Microsoft announced a new Sliverlight Streaming Service for Windows Live where you can upload Silverlight Application that include the Silverlight XAML, javascript, images, and video.  What's cool about this is that you can package all of the assets needed for a silverlight application in a zip archive and upload the application to the service.  When I heard about that, I created a free account on the service and tried out by uploading one of my transformed maps.  It worked! 

As an aside, I have real appreaciation for the software engineering talent of people like Andrew, Amy, and Peter at Mindjet who I worked with when I was managing the devleopment team there. As you can see from what I've done in a few weeks, it's a far cry from what MindManager is and what it can do; the topic layout algorithms alone can get very tricky.  

Because the Windows Live Silverlight Streaming Service has a REST API, I can programatically create and upload the applications as well!  So to test that out, I created a simple Windows Forms application that I (or anyone else) could use to generate a Silverlight Application from a MindManager map and upload it to sliverlight.live.com.  Once it's uploaded, you can insert a little HTML into any web page (see below) and the application will work on that page. 

The code to upload a Silverlight Application is actually very simple:

public void Upload(string zipFilename, string filesetName)

{

    string url = string.Format("https://silverlight.services.live.com/{0}/{1}", m_accountId, filesetName);

    System.Net.WebRequest request = System.Net.WebRequest.Create(url);

    request.Credentials = new NetworkCredential(m_accountId, m_key);

    request.ContentType = "application/zip";

    request.Method = "PUT";

    using (System.IO.FileStream inputStream = new System.IO.FileStream(zipFilename, FileMode.Open))

    {

        using (System.IO.Stream requestStream = request.GetRequestStream())

        {

            BinaryCopier.CopyStream(inputStream, requestStream);

            requestStream.Close();

        }

        request.GetResponse();

    }

}

 

Now that I have a Silverlight applications uploaded, I can start integrating it with other Silverlight applications or websites like this: https://xmldocs.net/Map.aspx.

I have attached the code for the uploader application (with the Javascript and XSLT) so you can get started with trying this cool synergy out.

Here's what you can do now:

  • Play around with the map at the bottom of this post or at https://xmldocs.net/Map.aspx: zoom with the slider on the left, pan by dragging a topic, expand the topics, click on attachments and hyperlinks (you'll find an example of video playback in an attachment and also in a hyperlink). 
  • Create an account on https://silverlight.live.com to get 4GB of free Silverlight application hosting.
  • Download the uploader application and tinker with the XSL transform and Javascript.
  • Tell me what you think in the comments of this blog.
  • Take a look at how two Silverlight applications can be combined on one page at https://xmldocs.net/Map.aspx.

 

<span id="SilverlightMap

Control">

SilverlightMap.zip