public static Storyboard CreateStoryboard(Control resourceHolder, string resourceName)
        {
            ContentControl c = new ContentControl()
            {
                Template = (ControlTemplate)resourceHolder.Resources[resourceName]
            };

            c.ApplyTemplate();
            StoryboardContainer container = (StoryboardContainer)VisualTreeHelper.GetChild(c, 0);

            return(container.Storyboard);
        }
Пример #2
0
 Storyboard GetStoryboard(string resourceKey)
 {
     return(StoryboardContainer.CreateStoryboard(module, resourceKey));
 }