public static object Load(System.Xaml.XamlReader xamlReader, bool skipJournaledProperties, Uri baseUri)
        {
            XamlObjectWriterSettings settings = XamlReader.CreateObjectWriterSettings();
            object result = WpfXamlLoader.Load(xamlReader, null, skipJournaledProperties, null, settings, baseUri);

            EnsureXmlNamespaceMaps(result, xamlReader.SchemaContext);
            return(result);
        }
Exemple #2
0
        // Token: 0x06002268 RID: 8808 RVA: 0x000AAD94 File Offset: 0x000A8F94
        public static object LoadBaml(XamlReader xamlReader, bool skipJournaledProperties, object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
        {
            XamlObjectWriterSettings xamlObjectWriterSettings = XamlReader.CreateObjectWriterSettingsForBaml();

            xamlObjectWriterSettings.RootObjectInstance = rootObject;
            xamlObjectWriterSettings.AccessLevel        = accessLevel;
            object obj = WpfXamlLoader.Load(xamlReader, null, skipJournaledProperties, rootObject, xamlObjectWriterSettings, baseUri);

            WpfXamlLoader.EnsureXmlNamespaceMaps(obj, xamlReader.SchemaContext);
            return(obj);
        }
Exemple #3
0
        internal static object Load(
            System.Xaml.XamlReader xamlReader,
            ParserContext parserContext)
        {
            if (parserContext == null)
            {
                parserContext = new ParserContext();
            }

            // In some cases, the application constructor is not run prior to loading,
            // causing the loader not to recognize URIs beginning with "pack:" or "application:".
            MS.Internal.WindowsBase.SecurityHelper.RunClassConstructor(typeof(System.Windows.Application));

            EventTrace.EasyTraceEvent(EventTrace.Keyword.KeywordXamlBaml | EventTrace.Keyword.KeywordPerf, EventTrace.Event.WClientParseXamlBegin, parserContext.BaseUri);

            object root = WpfXamlLoader.Load(xamlReader, parserContext.SkipJournaledProperties, parserContext.BaseUri);

            DependencyObject dObject = root as DependencyObject;

            if (dObject != null)
            {
                if (parserContext.BaseUri != null && !String.IsNullOrEmpty(parserContext.BaseUri.ToString()))
                {
                    dObject.SetValue(BaseUriHelper.BaseUriProperty, parserContext.BaseUri);
                }
            }

            Application app = root as Application;

            if (app != null)
            {
                app.ApplicationMarkupBaseUri = GetBaseUri(parserContext.BaseUri);
            }

            EventTrace.EasyTraceEvent(EventTrace.Keyword.KeywordXamlBaml | EventTrace.Keyword.KeywordPerf, EventTrace.Event.WClientParseXamlEnd, parserContext.BaseUri);

            return(root);
        }
Exemple #4
0
        // Token: 0x06002267 RID: 8807 RVA: 0x000AAD70 File Offset: 0x000A8F70
        public static object LoadDeferredContent(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, XamlObjectWriterSettings parentSettings, Uri baseUri)
        {
            XamlObjectWriterSettings settings = XamlReader.CreateObjectWriterSettings(parentSettings);

            return(WpfXamlLoader.Load(xamlReader, writerFactory, skipJournaledProperties, rootObject, settings, baseUri));
        }