15.02.2015 Views

C# 4 and .NET 4

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1024 ❘ ChaPTer 35 cOre wpf<br />

the right eye. The first <strong>and</strong> third animation changes the Canvas.Left position for the eyes, <strong>and</strong> the second<br />

<strong>and</strong> fourth animation changes Canvas.Top. The animations in x <strong>and</strong> y direction have different time values<br />

that make the eye movement very interesting using the defined repeated behavior.<br />

The second event trigger is fired as soon as the Click event of the buttonStopMoveEyes button occurs.<br />

Here, the storyboard is stopped with the StopStoryboard element, which references the started storyboard<br />

beginMoveEye.<br />

The third event trigger is fired by clicking the buttonResize button. With this animation the<br />

transformation of the Canvas element is changed. Because this animation doesn’t run endlessly, there’s no<br />

stop. This storyboard also makes use of the EaseFunction that was explained previously:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!