Ch.Epyx.WindMobile.WP7.View.Transition.FadeTransition.GetStoryboard C# (CSharp) Method

GetStoryboard() private static method

Creates a T:System.Windows.Media.Storyboard for a particular transition family and transition mode.
private static GetStoryboard ( string name ) : System.Windows.Media.Animation.Storyboard
name string The transition family and transition mode.
return System.Windows.Media.Animation.Storyboard
        private static Storyboard GetStoryboard(string name)
        {
            if (_storyboardXamlCache == null)
            {
                _storyboardXamlCache = new Dictionary<string, string>();
            }
            string xaml = null;
            if (_storyboardXamlCache.ContainsKey(name))
            {
                xaml = _storyboardXamlCache[name];
            }
            else
            {
                string path = "/Ch.Epix.WindMobile.WP7;component/View/Transition/Storyboard/" + name + ".xaml";
                Uri uri = new Uri(path, UriKind.Relative);
                StreamResourceInfo streamResourceInfo = Application.GetResourceStream(uri);
                using (StreamReader streamReader = new StreamReader(streamResourceInfo.Stream))
                {
                    xaml = streamReader.ReadToEnd();
                    _storyboardXamlCache[name] = xaml;
                }
            }
            return XamlReader.Load(xaml) as Storyboard;
        }