View Port? RRS feed

  • Question

  • VS2010 SL4 (newbie) VB

    Hi all,

    I'm doing a calendar animation on a larger user contol (silverlight app) so that when the use clicks prev or next the calendar smoothly scrolls left or right displaying the new calendar month.  I've got it working for the most part except that when I translate the new month into place next to the current and then subsequently translate the old and new across the 'viewport' of the calendar using my storyboard, both months show up on the screen and remain after the animation.

    I may not be explaiing it very clearly, but what I want is a type of viewport such that any part of my month grid that appear outside of the viewport is not rendered.

     Is there a way to tell (a grid in this case) to not render outside of a cetrain area of the screen.

    Ideally I can imagine a viewport control (similar to a canvas) that contains other child elements but does not render them except withing the viewable area.

    How can I do this? 



    Thursday, July 1, 2010 4:50 PM


  • OK...I figured out I can use clipping regions to do this, in particular, a rectuangular clipping region on the parent control will provide the view port I want.  However, the control I'm animating dynamically sizes as the browser window is sized, so my clipping region must also resize dynamically.

    I have not tried it yet, but I'm assuming there is a reszie event of some sort I can hook into...

    Thursday, July 1, 2010 11:00 PM