As promised, I've just completed a 15-minute video tutorial that shows you how to create a Silverlight 2.0 application using DeepZoom. Even if you are unfamiliar with DeepZoom and just want to learn how to build a cool Silverlight application, this is the tutorial for you!
The tutorial covers project setup as well, which I think is quite valuable if you're new to the whole Blend / VS 2008 / Silverlight gig.
What am I building?
This. Click to focus the control, press W to zoom in, press S to zoom out.
What you need
- Visual Studio 2008 (if you're a student, you can always get it from DreamSpark or your university's MSDN AA account)
- The stuff from the Silverlight.net GetStarted site: http://www.silverlight.net/GetStarted
- Some photographs!
- A working knowledge of C#
This is loosely based on Scott Hanselman's early work following the announcement at MIX 2008. If you are interested in doing more with the mouse, such as dragging and the mouse wheel, check out his article.
Watch it here, or download it full-resolution at the bottom of this article.
Here's a snapshot of the code in Page.xaml.cs that handles the primitive zooming. Note: The variable 'dzo' is a reference to the MultiScaleImage control in my project, short for "DeepZoomObject."
- Download the source code (with images)
- Download the video in .wmv format:
Note you will need a Windows Live ID to access my public SkyDrive folder