SHARE
TWEET

Moving an object on an axis in WinRT

a guest Sep 23rd, 2012 290 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Andrew Ames
  2.  
  3. Inside your element, for example a Grid, add the necessary transform as such:
  4.  
  5. <Grid x:Name="AnimationGrid">
  6.     <Grid.RenderTransform>
  7.         <TranslateTransform />
  8.     </Grid.RenderTransform>
  9. ...
  10. </Grid>
  11.  
  12. Your storyboard would look like:
  13.  
  14.  
  15. <Storyboard>
  16.     <DoubleAnimation From="0" To="200" Storyboard.TargetName="AnimationGrid" Storyboard.TargetProperty="(RenderTransform).CompositeTransform.X" Duration="0:0:1.000" />
  17. </Storyboard>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top