(X) Hide this
    • Login
    • Join
      • Say No Bots Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Silverlight 4: Using the VisualStateManager for state animations with MVVM

(0 votes)
0 comments   /   posted by Silverlight Show on Apr 07, 2010
Tags:   visualstatemanagers , animations , mvvm , silverlight-4 , alex-van-beek
In this post Alex van Beek demonstrates how to use the VisualStateManager to start an animation and incorporate it in the MVVM pattern, without keeping a reference from the ViewModel to the View. 

A recurring problem with MVVM is how to incorporate animations in a nice MVVM way. The problem is that StoryBoards need to be started from the view, since they are usually configured in XAML. This means that the ViewModel needs a reference to the view, in order to tell it when the animation should start. Keeping a reference from the ViewModel to the View is obviously “not done” in the MVVM pattern.


Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook

Our News on Twitter