How can i use animation in MVVM How can i use animation in MVVM
Old forum URL: forums.lhotka.net/forums/t/8444.aspx
ambreshgaur posted on Monday, February 01, 2010
Im working on a silverlight project that uses CSLA and Model View View Model ....so far so good ....but now I need to animate using StoryBoard.Begin() ...... earlier i used to do it in code behind .....but now ..?????
Pls Help
AmbreshKevin Fairclough replied on Monday, February 01, 2010
I would still use the code-behind for animation as it is a pure UI task.
Kevin
ambreshgaur replied on Monday, February 01, 2010
I want to animate my message based on my previous action such as ...Saving a record or deleting a record .....how should i do that?sergeyb replied on Monday, February 01, 2010
If your VM has a reference to your view, then you can do this in VM:
(this.View.Resources["SB"] as StoryBoard).Begin().
If you do not have a reference to a view, then you would have to rely on something like an EventAggregator and raise an event that your view would react to. You could also use behaviors in SL 3. I have not completely thought this through, but you can trigger animation off an event of VM.
Sergey Barskiy
Principal Consultant
office: 678.405.0687 | mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation
-----Original Message-----
From: ambreshgaur [mailto:cslanet@lhotka.net]
Sent: Monday, February 01, 2010 7:15 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] How can i use animation in MVVM
I want to animate my message based on my previous action such as ...Saving a record or deleting a record .....how should i do that?
ambreshgaur replied on Monday, February 01, 2010
Pls give example code ..... Thanx I appreciate
Copyright (c) Marimer LLC