I have troubles animating a StackPanel with the VisualStateManager.
VisualStateManager.GoToState() accepts a Control as parameter, but StackPanel is of type UIElement/FrameworkElement.
How can I call VisualStateManager.GoToState() on a StackPanel?
You can use
VisualStateManager.GoToElementStateThis post might help you: WPF using VisualStateManager to animate panels in & out.
Edit:
The methods above are only for WPF and not available in Silverlight. For Silverlight the
ExtendedVisualStateManagerfrom the Blend SDK might be helpful:http://msdn.microsoft.com/de-de/library/microsoft.expression.interactivity.core.extendedvisualstatemanager.gotoelementstate(v=expression.40).aspx
You would have to include the
Microsoft.Expression.Interactionsassembly though.