Implemented VisualStateManager.