private static void AnimateSection(ItemsControl itemsControl, double fromHeight, double toHeight) { var animate = new Storyboard (); var showHideContent = new DoubleAnimation { Duration = new Duration(TimeSpan.FromSeconds(1)) }; showHideContent.From = fromHeight; showHideContent.To = toHeight; Storyboard.SetTarget(showHideContent, itemsControl); Storyboard.SetTargetProperty(showHideContent, "Height"); Timeline.AllowDependentAnimations = true; animate.Children.Add(showHideContent); animate.Begin(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)