コード例 #1
0
        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));
 }