Пример #1
0
        public static object Load(string xaml)
        {
            // if 'xaml' is null then this will throw a NullReferenceException, just like SL2 throws for null
            if (xaml.Length == 0)
            {
                return(null);
            }

            XamlLoader loader = XamlLoaderFactory.CreateLoader();

            return(loader.CreateObjectFromString(xaml, true));
        }
Пример #2
0
        public static object LoadWithInitialTemplateValidation(string xaml)
        {
            XamlLoader loader = XamlLoaderFactory.CreateLoader();

            return(loader.CreateObjectFromString(xaml, true, true));
        }