public override object Load(XamlReader xamlReader, IServiceProvider context)
        {
            FuncFactory factory = FuncFactory.CreateFactory(xamlReader, context);

            factory.IgnoreParentSettings = true;
            return(factory.GetFunc());
        }
        public override object Load(XamlReader xamlReader, IServiceProvider context)
        {
            FuncFactory factory = FuncFactory.CreateFactory(xamlReader, context);

            if (context.GetService(typeof(IXamlNamespaceResolver)) is IXamlNamespaceResolver nsResolver)
            {
                factory.ParentNamespaces = nsResolver.GetNamespacePrefixes().ToList();
            }
            return(factory.GetFunc());
        }
Esempio n. 3
0
        public static Func <object> CreateFunc(XamlReader reader, Type returnType)
        {
            FuncFactory factory = CreateFactory(null, reader, returnType);

            return(factory.GetFunc());
        }