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 - Canvas.SetTop() doesn't work after use of a Storyboard

 
 
Old 10-16-2006   #1 (permalink)
ben174@gmail.com


 
 

Canvas.SetTop() doesn't work after use of a Storyboard

I'm having problems using Canvas.SetTop() after I've animated a
storyboard. Here's what happens:

On the MouseMove event I'm relocating a Rectangle... In response to
another event I want to animate the rectangle using a storyboard, then
restore the functionality of the mousemove event. The MouseMove event
is working fine at setting the location of the rectangle, but after
using a storyboard to animate the rectangle, the Canvas.SetTop() method
has no effect on the location of the rectangle. Even when the
storyboard animation is complete. It's like after using a storyboard, I
cannot use Canvas.SetTop() to relocate the rectangle.

Any clue how to make Canvas.SetTop() work again after using a
storyboard?

Thanks,
- Ben Friedland


My System SpecsSystem Spec
Old 10-17-2006   #2 (permalink)
Douglas Stockwell


 
 

Re: Canvas.SetTop() doesn't work after use of a Storyboard

Are you animating the Canvas.Top property?

This post on LearnWPF.com might help to explain the issue:
http://learnwpf.com/Posts/Post.aspx?...5-7eaf0c48ec91

- Doug

<ben174@gmail.com> wrote in message
news:1161025446.895747.136930@m73g2000cwd.googlegroups.com...
> I'm having problems using Canvas.SetTop() after I've animated a
> storyboard. Here's what happens:
>
> On the MouseMove event I'm relocating a Rectangle... In response to
> another event I want to animate the rectangle using a storyboard, then
> restore the functionality of the mousemove event. The MouseMove event
> is working fine at setting the location of the rectangle, but after
> using a storyboard to animate the rectangle, the Canvas.SetTop() method
> has no effect on the location of the rectangle. Even when the
> storyboard animation is complete. It's like after using a storyboard, I
> cannot use Canvas.SetTop() to relocate the rectangle.
>
> Any clue how to make Canvas.SetTop() work again after using a
> storyboard?
>
> Thanks,
> - Ben Friedland
>


My System SpecsSystem Spec
Old 10-17-2006   #3 (permalink)
ben174@gmail.com


 
 

Re: Canvas.SetTop() doesn't work after use of a Storyboard

Thank you, Doug. That article answered the question. I needed to set
the FillBehavior property to "Stop" so it wouldn't hold the last frame.

- Ben Friedland


Douglas Stockwell wrote:
> Are you animating the Canvas.Top property?
>
> This post on LearnWPF.com might help to explain the issue:
> http://learnwpf.com/Posts/Post.aspx?...5-7eaf0c48ec91
>
> - Doug
>
> <ben174@gmail.com> wrote in message
> news:1161025446.895747.136930@m73g2000cwd.googlegroups.com...
> > I'm having problems using Canvas.SetTop() after I've animated a
> > storyboard. Here's what happens:
> >
> > On the MouseMove event I'm relocating a Rectangle... In response to
> > another event I want to animate the rectangle using a storyboard, then
> > restore the functionality of the mousemove event. The MouseMove event
> > is working fine at setting the location of the rectangle, but after
> > using a storyboard to animate the rectangle, the Canvas.SetTop() method
> > has no effect on the location of the rectangle. Even when the
> > storyboard animation is complete. It's like after using a storyboard, I
> > cannot use Canvas.SetTop() to relocate the rectangle.
> >
> > Any clue how to make Canvas.SetTop() work again after using a
> > storyboard?
> >
> > Thanks,
> > - Ben Friedland
> >


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Canvas does not allow drawing Vista General


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