Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version
Go to top

Silverlight Database Deep Zoom

, 26 Mar 2009
The article describes how to create a Deep Zoom image and store the tiles in a database, and how to read the image from the database and display it in the browser.
DatabaseDeepZoom.zip
DatabaseDeepZoom.root
DatabaseDeepZoom
DatabaseDeepZoom.csproj.user
Properties
Settings.settings
Search Image.ico
DbDzComposer
Properties
scopeDbDz.csproj.user
DeepZoomSilverlightProject
DeepZoomSilverlightProject.csproj.user
fullscreen_hover.png
fullscreen_pressed.png
fullscreen_rest.png
home_hover.png
home_pressed.png
home_rest.png
Properties
Service References
ImageListClient
configuration.svcinfo
configuration91.svcinfo
DeepZoomSilverlightProject.ImageListClient.ImageInfo.datasource
ImageListService.disco
ImageListService.wsdl
ImageListService1.wsdl
Reference.svcmap
ServiceReferences.ClientConfig
zoomin_hover.png
zoomin_pressed.png
zoomin_rest.png
zoomout_hover.png
zoomout_pressed.png
zoomout_rest.png
DeepZoomSilverlightWeb
App_Data
DeepZoom.mdb
bin
de
es
fr
it
ja
ko
zh-Hans
zh-Hant
ClientBin
DeepZoomSilverlightProject.xap
DeepZoomSilverlightWeb.csproj.user
ImageListService.svc
Properties
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace DeepZoomSilverlightProject
{
    public partial class App : Application
    {

        public App()
        {
            this.Startup += this.Application_Startup;
            this.Exit += this.Application_Exit;
            this.UnhandledException += this.Application_UnhandledException;

            InitializeComponent();
        }

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            this.RootVisual = new Page();
        }

        private void Application_Exit(object sender, EventArgs e)
        {

        }
        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            // If the app is running outside of the debugger then report the exception using
            // the browser's exception mechanism. On IE this will display it a yellow alert 
            // icon in the status bar and Firefox will display a script error.
            if (!System.Diagnostics.Debugger.IsAttached)
            {

                // NOTE: This will allow the application to continue running after an exception has been thrown
                // but not handled. 
                // For production applications this error handling should be replaced with something that will 
                // report the error to the website and stop the application.
                e.Handled = true;

                try
                {
                    string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
                    errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");

                    System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight 2 Application " + errorMsg + "\");");
                }
                catch (Exception)
                {
                }
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Joerg Lang
CEO
Switzerland Switzerland
I have my own software company called Evelix (www.evelix.ch). The company is located in Liestal, Switzerland. I develop software for the web and the desktop. Every now and then I give computer classes in a learning institution.
 
I was born in 1966, am married and have one kid. Hobbies are Fasnacht (www.bmg.bs), skiing and of course computers.
 
Actually I studied mechanical engineering and have a bachelors degree in it, but computers interested me since I had a Commodore C128. In the meantime my mobile has a thousand times more memory than my computers back then. First I started programming in Basic. After that I did use Pascal for a while, but the real (commercial) programming started with VB3. Now I do programming in C# and sometimes still in VB6 when I have to support an older application.
 
Currently I'm working towards my Microsoft Certified Trainer status.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 26 Mar 2009
Article Copyright 2009 by Joerg Lang
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid