One of the things I have seen the biggest buzz around lately is DeepZoom. This is a really cool technology that gives users a whole different way to display images or show vast amounts of data.
There is an amazing sample of this technology done at the HardRock Memorabilia site.
This information is brought to you by: http://blogs.msdn.com/tom
So how do you get started with this? Well the easiest way is to download a few different things:
- Preview of the Deep Zoom Composer
- Installation Tips for Silverlight Tools Beta 1 for Visual Studio 2008 - if using VS 2008
- Expression Blend 2.5 - if not using VS 2008
Note: there is also a Deep Zoom Composer User Guide
Then you use the Import workspace to bring in your pictures:
Then you want to switch to the compose workspace and place the images where you want them:
Once that is done, switch to the Export workspace and give it a name and click export. This will create a bunch of folders with all the necessary files to display this.
Now we create our Silverlight Application project in VS2008 with the new Silverlight beta installed, and select to add a new web to the solution for hosting the control:
So take the output folder, called osu for me, and copy the files to where your project can read them from, for example, I placed them under the ClientBin folder of my web application for easier access. Now you edit the xaml file to add the usercontrol:
Notice that we gave this object the name myMsi. We will use that in the code. So now we want to setup the hooks for all the mouse events. I used the same code Scott has on his blog along with the MouseWheelHelper code referenced above also.
That is it. Just build the project and then browse to the test page, MyDeepZoomTestPage.aspx in my application, and you have your DeepZoom application all complete.
Note: If you use IIS, don't forget to setup .xap files as the mime type application/x-silverlight-app on your IIS instance. Thanks to Scott for reminding us of that.