Canvas borders c# ( Windows Phone 7)

52 views Asked by At

I am using Storyboard to move my Images in Canvas. I am wondering if there is an option, when Image is moving to bottom and get into bottom border and Image will not move more down but also not stay. The point is how to make that Image will just sink down and finally dissapear ?

 DoubleAnimation myAnimation = new DoubleAnimation();
 myAnimation.SpeedRatio = 3;
 myAnimation.AutoReverse = false;
 myAnimation.From = 0;
 myAnimation.To = 700; // Here is 700 but how to make it as I wrote at the top?
 myAnimation.Duration = new Duration(TimeSpan.FromSeconds(2));
 myAnimation.BeginTime = beginTime;
 this.beginTime += TimeSpan.FromMilliseconds(300); 

Storyboard.SetTarget(myAnimation, screenImages[spinedCount, 0]);
Storyboard.SetTargetProperty(myAnimation, new PropertyPath("(Canvas.Top)"))

;

1

There are 1 answers

0
miechooy On BEST ANSWER

I`ve fixed this problem. I had just to create another canvas below and set ZIndex to higher paremeter

For the bottom Canvas

Canvas.ZIndex = 1

For the top Canvas

Canvas.ZIndex = 0

Its just about the priority of ZIndex