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: http://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 http://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 http://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 http://xmldocs.net/Map.aspx.


 



SilverlightMap.zip

Comments (13)

  1. Brett says:

    Lack of a web viewer is a huge missing piece in MindManager. If it can be elegantly solved this way that is fantastic!

  2. Really nice idea Michael, though MindManager does have a web viewer for IE now (Brett see  – http://www.mindjet.com/eu/products/mindmanager_viewers/publishers.php?s=3) it is IE only, and not as cool as silverlight!

    Is the app or source available to download – I would love to have a play with it?

    Cheers

    Ian

  3. Oops just spotted the attachment!  Scratch that last comment!

  4. I’m sure that most folks interested in Silverlight have seen Scott’s in-depth post from Monday . If you

  5. Synergist says:

    For those of you have heard, a Release Candidate for Silverlight 1.0 was released yesterday. I had written

  6. For those of you have heard, a Release Candidate for Silverlight 1.0 was released yesterday. I had written

  7. Synergist says:

    One of the first demonstrations of Silverlight that I built was a tool that transforms a MindManager

  8. renedepaula says:

    I can’t find the attachment… where is it?

  9. renedepaula says:

    ops… I found it  🙂   but when I try to open in VS2008 it asks for password of SilverlightMap.pfx…

  10. mscherotter says:

    Uncheck the option to sign the assembly and you should be fine.

    Michael

  11.   eu sou absolutamente apaixonado pelo MindManager , um software bárbaro para se criar mapas

  12. Trinity says:

    I ran the application with VS 2008 and ‘Generate Application’ for a mmap file.  The testApplication.zip was created, but when I ‘Upload’ it to silverlight, I get a ‘Root element missing’ on line 94 in Form1.cs.

    I tried upload it manually to silverlight website and get the same error when viewing it.  The error is in map.xaml – line 5, position 41

  13. Kate says:

    I'm working on Visual Studio 2008 with Silver Light 3.0.

    I surprise when opening your project(SilverlightMap.zip).Can I ask a silly question?Why can your project drap control(Toolbox) on Design view of silverlight?Everyone said that I could do that on VS 2010, not VS 2008.

    I wait your reply.

    bobin141322@yahoo.com