Mike Taulty's Blog
Bits and Bytes from Microsoft UK
Silverlight 2 - Update to MultiScaleImage Post
Mike Taulty's Blog

Mike's Badges

Follow on Twitter
View mike's profile on slideshare
Add to Technorati Favorites
CW Blog Awards

Quick update to this post - firstly I changed my OnKeyDown function;

 

    void OnKeyDown(object sender, KeyEventArgs e)
    {
      double centreX = msi.ViewportOrigin.X + (msi.ViewportWidth / 2);

      double viewportHeight = msi.ViewportWidth / msi.AspectRatio;

      double centreY = msi.ViewportOrigin.Y + (viewportHeight / 2);

      double xInc = 0.05 * msi.ViewportWidth;
      double yInc = 0.05 * viewportHeight;

      switch (e.Key)
      {
        case Key.I:
          msi.ZoomAboutLogicalPoint(1.1, centreX, centreY);
          break;  
        case Key.O:
          msi.ZoomAboutLogicalPoint(0.9, centreX, centreY);
          break;
        case Key.Right:
          msi.ViewportOrigin = new Point(msi.ViewportOrigin.X + xInc,
            msi.ViewportOrigin.Y);
          break;
        case Key.Left:
          msi.ViewportOrigin = new Point(msi.ViewportOrigin.X - xInc,
            msi.ViewportOrigin.Y);
          break;
        case Key.Up:
          msi.ViewportOrigin = new Point(msi.ViewportOrigin.X,
            msi.ViewportOrigin.Y - yInc);
          break;
        case Key.Down:
          msi.ViewportOrigin = new Point(msi.ViewportOrigin.X,
            msi.ViewportOrigin.Y + yInc);
          break;
        default:
          break;
      }
    }
  }

 

and secondly I learned a little bit more ( I think ) about using the Deep Zoom Composer. I revisited my project and arrange these 9 images;

image

and if you notice in the middle image there's a magnifying glass showing where I've dropped 9 more images...so I zoom in...

image

and right in the middle of that image I have 9 more images ( they are in the eye of one of the fish :-) ) and if you notice in the middle there's a magnifying glass and so if I zoom in further;

image

then in the middle of that image there are 9 more images. I stopped at that point, it was making my head hurt :-) but it makes for a nicer zoom in and zoom out demo than I originally had with just a bunch of images and no "images inside images".


Posted Sat, Mar 8 2008 9:51 AM by mtaulty
Filed under:

Comments

Canadian User Experience wrote Silverlight 2 Resource
on Wed, Mar 26 2008 8:52 AM
It has been three weeks since we annouced Silverlight 2 at MIX08. Many of you are excited to getting
Finance Innovation Contest Winners | DavidCrow.ca wrote Finance Innovation Contest Winners | DavidCrow.ca
on Wed, Apr 2 2008 2:05 PM
(C) Mike Taulty, 2009. All rights reserved. The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems