Note that there are some explanatory texts on larger screens.

plurals
  1. POWP7 transition between Canvas's in a Grid
    primarykey
    data
    text
    <p>I have two canvas's in a Grid, full scene "images" that I want to transition, I wonder how I would go about transitioning between these two Canvas controls.</p> <p>Programatically I add the first canvas to the grid, then I add the second canvas to the grid, and remove the first, what I really want to do is transition between them.</p> <p>Any suggestions on how I might achieve this programatically?</p> <p>Thanks.</p> <p><strong>Edit: I have implemented this method, but am having problems, anyone able to tell me if I'm using it wrong?</strong></p> <pre><code> private void doTransitionIn(Canvas slide) { SlideTransition slideLeft = new SlideTransition(); slideLeft.Mode = SlideTransitionMode.SlideDownFadeIn; ITransition transition = slideLeft.GetTransition(slide); transition.Completed += delegate { transition.Stop(); }; transition.Begin(); } private void doTransitionOut(Canvas slide) { SlideTransition slideLeft = new SlideTransition(); slideLeft.Mode = SlideTransitionMode.SlideDownFadeOut; ITransition transition = slideLeft.GetTransition(slide); transition.Completed += delegate { transition.Stop(); }; transition.Begin(); } </code></pre> <p>And here is how I use it:</p> <pre><code> SceneGrid.Children.Add(nextCanvas); doTransitionIn(nextCanvas); doTransitionOut(currentCanvas); SceneGrid.Children.Remove(currentCanvas); </code></pre> <p>The problem with this is that the animation only seems to start from part way down the screen, as in, i only see it slide the last 20 or so pixels, it doesn't slide all the way.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload