Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - stackpanel margin animation question

 
 
Old 04-17-2007   #1 (permalink)
vader


 
 

stackpanel margin animation question

Hi!
I started learning WPF today and want to create an animation for my
school homework.


I have 2 stackpanels in different margins (they are not always like
these ones. um... they are random, actually).

for example :
stack1 (0,0,0,0)
stack2 (0,0,100,0)

then I do a thickness animation :

<ThicknessAnimation Storyboard.TargetName="stack1"
Storyboard.TargetProperty="Margin" From="0,0,0,0" To="0,0,-200,0"
Duration="0:0:1" BeginTime="0:0:0.01" />
<ThicknessAnimation Storyboard.TargetName="stack2"
Storyboard.TargetProperty="Margin" From="0,0,0,0" To="0,0,-200,0"
Duration="0:0:1" BeginTime="0:0:0.02" />

then, why the final result is
stack1 (0,0,-200,0)
stack2 (0,0,-100,0)

I have put on the stack1 animation : FROM="0,0,0,0", but it doesnt
work because the animation start from 0,0,100,0 anyway.

how to move the stack1 from any coordinates into 0,0,0,0 first, before
animating it?

Thanks a lot!


My System SpecsSystem Spec
 

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46