![]() |
Web Development »
Silverlight »
General
Beginner
License: The Code Project Open License (CPOL)
Introduction to Silverlight 2 using DeepZoomBy Vuyiswa MasekoHow to use DeepZoom |
Silverlight
|
||||||||||
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
Knowing how to titivate and place images in the places in an application does not make a person a good Programmer, Atleast that’s the only way to protect myself from criticism that comes from someone who knows how to place a photo in a right place. In my early days of programming in C++ under Linux environment, in java times of jdk 1.2 we have never experienced what today’s programmer’s experience. Java GUI was not nice, vb6 programmers needed more skinners to make their application crispier and till today I have never seen a nice GUI of an application created with early C++. Finally that made me not to be good in Titivation.
Me at the airport (
In 2008 my (City of
Final Presentation where DeepZoom was demonstrated.
In order to follow my steps in this Article, You going to need some few things that do not come with visual studio. The nice thing is that you can download those tools for free. The first thing we going to need is “DeepZoom Composer” that is Downloadable from here. And you need visual studio 2008 or you can download the Express edition here. And the last thing is the SilverlightTools that can be downloaded from here.
Now we are going to make our Small Project that will Demonstrate DeepZoom Capabilities and how can you use them in your website. The Web Host am using for my website does not belong to me, so I can’t use Silverlight there, but you can find a fully working website that can demonstrate the features of DeepZoom here
After installing a DeepZoom Composer, open it and the following dialog box will show
As the first time user, you will not see any projects, but as you can see I have created some project before. Next is to click on new Project and you will see the Following
Give it a meaningful name and place it in its own directory, because Silverlight Files are a little bit complicated, later you will see which ones are important in our Project. When done Click ok
Now what you see is our workspace, but first we must import images as you can see above we have 3 steps
Step1: Importing of Images
Step2: Placing the Images in the canvas, hiding images behind images or on top of images
Step3: Export the DeepZoom Project and Convert it into a Silverlight 2 Project that can be opened in Visual Studio 2008.
Let is Import four images and after we have added our images things will look like this
Now let’s move to the Step 2, on the above menu Click on Compose and the Screen will look like this
Now what you need to do is to drag the images to the wide empty space and start arranging them the way you want them. Now in the Following Step I need you to watch carefully. I will drop the First Image that will Fill the Canvas like this
Now remember if you drop a photo, you cannot drop it again, unless you make a copy of it with another name. So after you drop it on the canvas, it will be disabled, that means you cannot drop it again. Now as you can see I have a nice empty beach and in the beach I want to place my other image. Now let’s place another image.
As you can see I have placed my image on top of the beach image, but to demonstrate DeepZoom capabilities we have to hide this image. To hide this image, Hold one of handle of the image and drag it to itself

The picture is shrinking; Shrink it until you see something like this

Now let’s drag this so that it can be seen as a small dot. Now our Composer will look like this
That yellow pin is our picture, but when we test the Project we will not see a yellow pin, but if we click towards that area we will see a small dot and if we continue following the dot, it will be our image and it will outgrow the container image. Now lets add another image again shrink it as we did with this one.

After am done, my Composer will look like this. Now all the steps are done except the last one, using the above menu, move to Export.

Moving to export, there are some Settings that need to be chosen. Let us look in detail in the settings dialog

In this Step, DeepZoom will create a Silverlight project, as you can see you can change the Format of the images, but for now, lets keep it defaulted to PNG and in the Output type, this is where you tell DeepZoom to create a Silverlight Project or you only want images. By default it will choose the “Export images and Silverlight Project” do not change it leave it as is. After everything is Completed Click on the Export Button and wait for it to Finish

When done, you will be given a Chance to see how your Project will look, by clicking on the Internet icon (1st) in the Following options.

Let’s see how it looks.
My Webpage will look like this

Now remember that we have hidden Pictures and what we can see is our nice simple clean beach, and if I want to tell you a Story about Durban in South Africa, I will just click and Zoom to the Picture that is hidden, let us go to Picture 1, Click on the Hot Spot and until you see something like this

Move to our picture

As you can see the main Picture is fading and the destination picture is taking over the page like this

With DeepZoom you can do a lot, you can Zoom from inside a photo and inside another photo, like a Container into a Container. I think I have said enough. Lastly DeepZoom Creates a Project that can be opened in Visual studio. If you did not install Silverlight tools, your Solution Explorer will look like this

To resolve this install the Silverlight tools and right click on the dead Project and open it , look for this line in the Project File
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" />
When done leave it like that and go to your
C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\Silverlight\
Check if there is a Silverlight Folder and check if the File Microsoft.Silverlight.CSharp.targets is available and if its there change the above line in the Project file to
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\Silverlight\Microsoft.Silverlight.CSharp.targets" />
And right Click on the Dead Project from the Solution Explorer again and select “Reload project” and the dead Project will be revived. Explaining the Files Structure of Silverlight generated Project will be a Future task.
Wow this is my first Article where I did not have to write a single line of codeJ. As you can see the project has an html file, but in a case of moving the Functionality to the aspx page, you need to write a code :)
I too, am a learner in the Subject of Silverlight; I promise to share other resources when I can in this subject. For it is our opportunity to titivate our website and tell Stories about our past with only a Click in a Single webpage.
Thank you
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 3 Feb 2009 Editor: Sean Ewington |
Copyright 2009 by Vuyiswa Maseko Everything else Copyright © CodeProject, 1999-2009 Web22 | Advertise on the Code Project |