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

Blogs

Mike Taulty's Blog

Elsewhere

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
Microsoft Weblogs wrote Catching up with Silverlight 2
on Thu, Sep 10 2009 5:07 AM

Starting last week on March 5th after Silverlight 2 Beta 1 was announced, a lot has been said about Silverlight