davidg's profiledave's blogPhotosBlogListsMore Tools Help

Blog


    March 14

    Silverlight 2 Deep Zoom SubImages

    Following my earlier post, I've had a chance to do some investigation.

    Firstly, of course it's completely possible to change the "Source" property of the MultiScaleImage control at runtime.  This results in the Deep Zoom composition changing and doing that animation that it does when it loads.

    image Secondly, when you compose your Deep Zoom image with the Composer and check "Create Collection" the SubImages collection of your MultiScaleImage gets populated with the images in your composition complete with their location Points.

    You can then change the ViewportOrigin (which is a Point) on any of the MultiScaleSubImages and the change will be reflected in your browser.  Pretty neat considering this morning I thought Deep Zoom was just for static images.

    The obvious next step for this is that this lovely dependency property can be animated like any other to create your incredible layout effects.  The only problem I have at the moment is that these MultiScaleSubImages are obviously created at runtime and do not have a Name property to give to a DoubleAnimation.

    If there's anyone reading this who knows how to point an animation at an unnamed object then please let me know.

    Dave

    Comments (2)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    davidgwrote:
    Hi, thanks for leaving a comment.
     
    I dont think I've change the source property enough yet to see that problem, but I'll give it a try later on today. 
     
    And I think I've worked out how to animate the subimages items.  Waiting till I can give it some time to give it a try.
     
    Dave
    Mar. 15
    Jaywrote:
    I've been playing around with changing the Source property at runtime.  Although it seems to work the first one or two times, it appears that if the sources have different AspectRatios, then somehow ViewpointOrigin and ViewpointWidth rapidly grow to infinity.  I've tried resetting the ViewportWidth and ViewportOrigin before and after setting "Source =", and have also tried UpdateLayout(), but still can't seem to find the magic combination to get everything reset when switching Sources.
     
    Any ideas?
    Mar. 15

    Trackbacks (4)

    The trackback URL for this entry is:
    http://davegouge.spaces.live.com/blog/cns!EAA79C9C2A7E0109!381.trak
    Weblogs that reference this entry