Expression Blend and Design

The team blog of the Expression Blend and Design products.

Deep Zoom Sample with MouseWheel / Pan / Click-Zoom

Deep Zoom Sample with MouseWheel / Pan / Click-Zoom

  • Comments 32

Hi everyone,
One of the most frequent requests you all have made has been for samples that showcase taking the output from a Deep Zoom Composer project and integrating it with the MultiScaleImage control to have a cool example. We provided an example of that in the previous post. That example only included mouse wheel support but nothing else. In this post we not only incorporate mousewheel support for zooming but we also incorporate using the mouse to pan and clicking/Shift+clicking to zoom in or zoom out thanks to the nice work by Scott Hanselman.

The following example includes everything you need plus a sample Deep Zoom image containing some Vista wallpapers I arranged and exported via the Deep Zoom Composer:


slproject Download Sample

The sample solution contains both a C# Silverlight project as well as a Web Site project:

projectInfo

In your Web Site project, inside your ClientBin folder, you will see a folder called vistaWallpapers. The vistaWallpapers folder contains the images, xml, and bin files Deep Zoom Composer (DZC) output.

To reuse this sample for your own projects, delete the vistaWallpapers folder and import your own folder containing the DZC output. Once you have done that, open Page.xaml in your Silverlight project and change the source of your MultiScaleImage control to point to your new folder and its info.bin file in your Web Site project:

path

Once you have replaced your images and changed the path to the images in Page.xaml, build your project and view your DeepZoomOutput.html page in your browser. Things should just work...if they don't, please feel free to comment below and I'll take a look!

Cheers!
Kirupa =)

Leave a Comment
  • Please add 4 and 3 and type the answer here:
  • Post
  • Hi Kirupa,

    Thank you for your reply.

    Yes, I was able to create regular silver light 3 applications using expression blend. I have recently started to use expression blend.. and was able to create few sample silverlight 3 apps.. to host in a website..using blend...

  • Ah, I just noticed what the problem may be. This particular project is very outdated and came out during the SL2 beta time frame. You should really use Deep Zoom Composer to export a project using any of the SL3 based templates (Classic + Source or Behaviors + Source).

    You can get the latest version here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=457b17b7-52bf-4bda-87a3-fa8a4673f8bf

    The code found in DZC is also much more up-to-date, and you will be able to use Blend on the exported project without having to do anything extra.

    Cheers!

    Kirupa

Page 3 of 3 (32 items) 123