Exemplo n.º 1
0
        public static object Create(string xaml, bool doNotThrow = false)
        {
            object inflatedView = null;

            using (var reader = XmlReader.Create(new StringReader(xaml))) {
                while (reader.Read())
                {
                    //Skip until element
                    if (reader.NodeType == XmlNodeType.Whitespace)
                    {
                        continue;
                    }
                    if (reader.NodeType != XmlNodeType.Element)
                    {
                        Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                        continue;
                    }

                    var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), null, (IXmlNamespaceResolver)reader);
                    XamlParser.ParseXaml(rootnode, reader);
                    var visitorContext = new HydratationContext {
                        ExceptionHandler = doNotThrow ? e => { } : (Action <Exception>)null,
                    };
                    var cvv = new CreateValuesVisitor(visitorContext);
                    cvv.Visit((ElementNode)rootnode, null);
                    inflatedView = rootnode.Root = visitorContext.Values [rootnode];
                    visitorContext.RootElement = inflatedView as BindableObject;

                    Visit(rootnode, visitorContext);
                    break;
                }
            }
            return(inflatedView);
        }
Exemplo n.º 2
0
        public static void Load(object view, string xaml, bool useDesignProperties)
        {
            using (var textReader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textReader)) {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), view, (IXmlNamespaceResolver)reader);
                        XamlParser.ParseXaml(rootnode, reader);
                        Visit(rootnode, new HydrationContext {
                            RootElement = view,
#pragma warning disable 0618
                            ExceptionHandler = ResourceLoader.ExceptionHandler ?? (Internals.XamlLoader.DoNotThrowOnExceptions ? e => { } : (Action <Exception>)null)
#pragma warning restore 0618
                        }, useDesignProperties);
                        break;
                    }
                }
        }
Exemplo n.º 3
0
		public static object Create (string xaml, bool doNotThrow = false)
		{
			object inflatedView = null;
			using (var reader = XmlReader.Create (new StringReader (xaml))) {
				while (reader.Read ()) {
					//Skip until element
					if (reader.NodeType == XmlNodeType.Whitespace)
						continue;
					if (reader.NodeType != XmlNodeType.Element) {
						Debug.WriteLine ("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
						continue;
					}

					var rootnode = new RuntimeRootNode (new XmlType (reader.NamespaceURI, reader.Name, null), null, (IXmlNamespaceResolver)reader);
					XamlParser.ParseXaml (rootnode, reader);
					var visitorContext = new HydratationContext {
						DoNotThrowOnExceptions = doNotThrow,
					};
					var cvv = new CreateValuesVisitor (visitorContext);
					cvv.Visit ((ElementNode)rootnode, null);
					inflatedView = rootnode.Root = visitorContext.Values [rootnode];
					visitorContext.RootElement = inflatedView as BindableObject;

					Visit (rootnode, visitorContext);
					break;
				}
			}
			return inflatedView;
		}
Exemplo n.º 4
0
        public static void Load(object view, string xaml)
        {
            using (var reader = XmlReader.Create(new StringReader(xaml)))
            {
                while (reader.Read())
                {
                    //Skip until element
                    if (reader.NodeType == XmlNodeType.Whitespace)
                    {
                        continue;
                    }
                    if (reader.NodeType != XmlNodeType.Element)
                    {
                        Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                        continue;
                    }

                    var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), view, (IXmlNamespaceResolver)reader);
                    XamlParser.ParseXaml(rootnode, reader);
                    Visit(rootnode, new HydratationContext {
                        RootElement = view
                    });
                    break;
                }
            }
        }
Exemplo n.º 5
0
        public static IResourceDictionary LoadResources(string xaml, IResourcesProvider rootView)
        {
            void ehandler(Exception e) => ResourceLoader.ExceptionHandler2?.Invoke((e, XamlFilePathAttribute.GetFilePathForObject(rootView)));

            using (var textReader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textReader)) {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        //the root is set to null, and not to rootView, on purpose as we don't want to erase the current Resources of the view
                        RootNode rootNode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), null, (IXmlNamespaceResolver)reader);
                        XamlParser.ParseXaml(rootNode, reader);
                        var rNode = (IElementNode)rootNode;
                        if (!rNode.Properties.TryGetValue(new XmlName("http://xamarin.com/schemas/2014/forms", "Resources"), out var resources))
                        {
                            return(null);
                        }

                        var visitorContext = new HydrationContext
                        {
                            ExceptionHandler = ResourceLoader.ExceptionHandler2 != null ? ehandler : (Action <Exception>)null,
                        };
                        var cvv = new CreateValuesVisitor(visitorContext);
                        cvv.Visit((ElementNode)resources, null);
                        visitorContext.RootElement = visitorContext.Values[resources];

                        resources.Accept(new XamlNodeVisitor((node, parent) => node.Parent = parent), null);                 //set parents for {StaticResource}
                        resources.Accept(new ExpandMarkupsVisitor(visitorContext), null);
                        resources.Accept(new PruneIgnoredNodesVisitor(false), null);
                        resources.Accept(new NamescopingVisitor(visitorContext), null);                 //set namescopes for {x:Reference}
                        resources.Accept(new CreateValuesVisitor(visitorContext), null);
                        resources.Accept(new RegisterXNamesVisitor(visitorContext), null);
                        resources.Accept(new FillResourceDictionariesVisitor(visitorContext), null);
                        resources.Accept(new ApplyPropertiesVisitor(visitorContext, true), null);

                        return(visitorContext.Values[resources] as IResourceDictionary);
                    }
                }
            return(null);
        }
Exemplo n.º 6
0
        public static object Create(string xaml, bool doNotThrow, bool useDesignProperties)
        {
            doNotThrow = doNotThrow || ResourceLoader.ExceptionHandler2 != null;
            void ehandler(Exception e) => ResourceLoader.ExceptionHandler2?.Invoke((e, null));

            object inflatedView = null;

            using (var textreader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textreader)) {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        var typeArguments = XamlParser.GetTypeArguments(reader);
                        var rootnode      = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, typeArguments), null, (IXmlNamespaceResolver)reader)
                        {
                            LineNumber = ((IXmlLineInfo)reader).LineNumber, LinePosition = ((IXmlLineInfo)reader).LinePosition
                        };

                        XamlParser.ParseXaml(rootnode, reader);
                        var visitorContext = new HydrationContext {
                            ExceptionHandler = doNotThrow ? ehandler : (Action <Exception>)null,
                        };
                        var cvv = new CreateValuesVisitor(visitorContext);
                        cvv.Visit((ElementNode)rootnode, null);
                        inflatedView = rootnode.Root = visitorContext.Values[rootnode];
                        if (XamlFilePathAttribute.GetFilePathForObject(inflatedView) is string path)
                        {
                            VisualDiagnostics.RegisterSourceInfo(inflatedView, new Uri($"{path};assembly={inflatedView.GetType().GetTypeInfo().Assembly.GetName().Name}", UriKind.Relative), ((IXmlLineInfo)rootnode).LineNumber, ((IXmlLineInfo)rootnode).LinePosition);
                            VisualDiagnostics.SendVisualTreeChanged(null, inflatedView);
                        }
                        visitorContext.RootElement = inflatedView as BindableObject;

                        Visit(rootnode, visitorContext, useDesignProperties);
                        break;
                    }
                }
            return(inflatedView);
        }
Exemplo n.º 7
0
        public static T LoadObject <T>(string path)
        {
            var xaml = GetAnimationXaml(path);

            if (string.IsNullOrEmpty(xaml))
            {
                throw new XamlParseException(string.Format("No embeddedresource found for {0}", path), new XmlLineInfo());
            }
            Type type = typeof(T);
            T    ret  = (T)type.Assembly.CreateInstance(type.FullName);

            NameScopeExtensions.PushElement(ret);

            using (var textReader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textReader))
                {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), ret, (IXmlNamespaceResolver)reader);
                        XamlParser.ParseXaml(rootnode, reader);
                        var doNotThrow = ResourceLoader.ExceptionHandler != null || Internals.XamlLoader.DoNotThrowOnExceptions;
                        void ehandler(Exception e) => ResourceLoader.ExceptionHandler?.Invoke((e, path));

                        Visit(rootnode, new HydrationContext
                        {
                            RootElement = ret,
#pragma warning disable 0618
                            ExceptionHandler = doNotThrow ? ehandler : (Action <Exception>)null
#pragma warning restore 0618
                        });
                        break;
                    }
                }

            NameScopeExtensions.PopElement();
            return(ret);
        }
Exemplo n.º 8
0
        public static IResourceDictionary LoadResources(string xaml, IResourcesProvider rootView)
        {
            void ehandler(Exception e) => ResourceLoader.ExceptionHandler2?.Invoke((e, XamlFilePathAttribute.GetFilePathForObject(rootView)));

            using (var textReader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textReader))
                {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        //the root is set to null, and not to rootView, on purpose as we don't want to erase the current Resources of the view
                        RootNode rootNode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), null, (IXmlNamespaceResolver)reader)
                        {
                            LineNumber = ((IXmlLineInfo)reader).LineNumber, LinePosition = ((IXmlLineInfo)reader).LinePosition
                        };
                        XamlParser.ParseXaml(rootNode, reader);
                        var rNode = (IElementNode)rootNode;
                        if (!rNode.Properties.TryGetValue(new XmlName(XamlParser.MauiUri, "Resources"), out var resources))
                        {
                            return(null);
                        }

                        var visitorContext = new HydrationContext
                        {
                            ExceptionHandler = ResourceLoader.ExceptionHandler2 != null ? ehandler : (Action <Exception>)null,
                        };
                        var cvv = new CreateValuesVisitor(visitorContext);
                        if (resources is ElementNode resourcesEN && (resourcesEN.XmlType.NamespaceUri != XamlParser.MauiUri || resourcesEN.XmlType.Name != nameof(ResourceDictionary)))
                        {                 //single implicit resource
                            resources = new ElementNode(new XmlType(XamlParser.MauiUri, nameof(ResourceDictionary), null), XamlParser.MauiUri, rootNode.NamespaceResolver);
                            ((ElementNode)resources).CollectionItems.Add(resourcesEN);
                        }
Exemplo n.º 9
0
        public static void Load(object view, string xaml, Assembly rootAssembly, bool useDesignProperties)
        {
            using (var textReader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textReader)) {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), view, (IXmlNamespaceResolver)reader)
                        {
                            LineNumber = ((IXmlLineInfo)reader).LineNumber, LinePosition = ((IXmlLineInfo)reader).LinePosition
                        };
                        if (XamlFilePathAttribute.GetFilePathForObject(view) is string path)
                        {
                            VisualDiagnostics.RegisterSourceInfo(view, new Uri($"{path};assembly={view.GetType().GetTypeInfo().Assembly.GetName().Name}", UriKind.Relative), ((IXmlLineInfo)rootnode).LineNumber, ((IXmlLineInfo)rootnode).LinePosition);
                            VisualDiagnostics.SendVisualTreeChanged(null, view);
                        }
                        XamlParser.ParseXaml(rootnode, reader);
#pragma warning disable 0618
                        var doNotThrow = ResourceLoader.ExceptionHandler2 != null || Internals.XamlLoader.DoNotThrowOnExceptions;
#pragma warning restore 0618
                        void ehandler(Exception e) => ResourceLoader.ExceptionHandler2?.Invoke((e, XamlFilePathAttribute.GetFilePathForObject(view)));

                        Visit(rootnode, new HydrationContext {
                            RootElement      = view,
                            RootAssembly     = rootAssembly ?? view.GetType().GetTypeInfo().Assembly,
                            ExceptionHandler = doNotThrow ? ehandler : (Action <Exception>)null
                        }, useDesignProperties);
                        break;
                    }
                }
        }
Exemplo n.º 10
0
        public static Transition LoadTransition(string animationXamlPath)
        {
            var xaml = GetAnimationXaml(animationXamlPath);

            if (string.IsNullOrEmpty(xaml))
            {
                throw new XamlParseException(string.Format("No embeddedresource found for {0}", animationXamlPath), new XmlLineInfo());
            }
            Transition animation = new Transition();

            using (var textReader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textReader))
                {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), animation, (IXmlNamespaceResolver)reader);
                        XamlParser.ParseXaml(rootnode, reader);
                        Visit(rootnode, new HydrationContext
                        {
                            RootElement = animation,
#pragma warning disable 0618
                            ExceptionHandler = ResourceLoader.ExceptionHandler ?? (Internals.XamlLoader.DoNotThrowOnExceptions ? e => { } : (Action <Exception>)null)
#pragma warning restore 0618
                        });
                        break;
                    }
                }
            return(animation);
        }
Exemplo n.º 11
0
        public static object Create(string xaml, bool doNotThrow, bool useDesignProperties)
        {
            doNotThrow = doNotThrow || ResourceLoader.ExceptionHandler2 != null;
            void ehandler(Exception e) => ResourceLoader.ExceptionHandler2?.Invoke((e, null));

            object inflatedView = null;

            using (var textreader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textreader)) {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        var typeArguments = XamlParser.GetTypeArguments(reader);
                        var rootnode      = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, typeArguments), null, (IXmlNamespaceResolver)reader);
                        XamlParser.ParseXaml(rootnode, reader);
                        var visitorContext = new HydrationContext {
                            ExceptionHandler = doNotThrow ? ehandler : (Action <Exception>)null,
                        };
                        var cvv = new CreateValuesVisitor(visitorContext);
                        cvv.Visit((ElementNode)rootnode, null);
                        inflatedView = rootnode.Root = visitorContext.Values[rootnode];
                        visitorContext.RootElement = inflatedView as BindableObject;

                        Visit(rootnode, visitorContext, useDesignProperties);
                        break;
                    }
                }
            return(inflatedView);
        }
Exemplo n.º 12
0
        public static void Load(object view, string xaml, Assembly rootAssembly, bool useDesignProperties)
        {
            using (var textReader = new StringReader(xaml))
                using (var reader = XmlReader.Create(textReader))
                {
                    while (reader.Read())
                    {
                        //Skip until element
                        if (reader.NodeType == XmlNodeType.Whitespace)
                        {
                            continue;
                        }
                        if (reader.NodeType == XmlNodeType.XmlDeclaration)
                        {
                            continue;
                        }
                        if (reader.NodeType != XmlNodeType.Element)
                        {
                            Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                            continue;
                        }

                        var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), view, (IXmlNamespaceResolver)reader)
                        {
                            LineNumber = ((IXmlLineInfo)reader).LineNumber, LinePosition = ((IXmlLineInfo)reader).LinePosition
                        };
                        XamlParser.ParseXaml(rootnode, reader);
                        var doNotThrow = ResourceLoader.ExceptionHandler2 != null;
                        void ehandler(Exception e) => ResourceLoader.ExceptionHandler2?.Invoke((e, XamlFilePathAttribute.GetFilePathForObject(view)));

                        Visit(rootnode, new HydrationContext
                        {
                            RootElement      = view,
                            RootAssembly     = rootAssembly ?? view.GetType().Assembly,
                            ExceptionHandler = doNotThrow ? ehandler : (Action <Exception>)null
                        }, useDesignProperties);

                        VisualDiagnostics.OnChildAdded(null, view as Element);

                        break;
                    }
                }
        }
Exemplo n.º 13
0
        public static void Load(object view, XmlReader reader)
        {
            if (reader != null)
            {
                while (reader.Read())
                {
                    //Skip until element
                    if (reader.NodeType == XmlNodeType.Whitespace)
                    {
                        continue;
                    }
                    if (reader.NodeType == XmlNodeType.XmlDeclaration)
                    {
                        continue;
                    }
                    if (reader.NodeType != XmlNodeType.Element)
                    {
                        Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                        continue;
                    }

                    if (view is Element)
                    {
                        (view as Element).IsCreateByXaml = true;
                    }

                    var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), view, (IXmlNamespaceResolver)reader);
                    XamlParser.ParseXaml(rootnode, reader);
                    var doNotThrow = ResourceLoader.ExceptionHandler != null || Internals.XamlLoader.DoNotThrowOnExceptions;
                    void ehandler(Exception e) => ResourceLoader.ExceptionHandler?.Invoke((e, XamlFilePathAttribute.GetFilePathForObject(view)));

                    Visit(rootnode, new HydrationContext
                    {
                        RootElement = view,
#pragma warning disable 0618
                        ExceptionHandler = doNotThrow ? ehandler : (Action <Exception>)null
#pragma warning restore 0618
                    });
                    break;
                }
            }
        }
Exemplo n.º 14
0
		public static void Load(object view, string xaml)
		{
			using (var reader = XmlReader.Create(new StringReader(xaml)))
			{
				while (reader.Read())
				{
					//Skip until element
					if (reader.NodeType == XmlNodeType.Whitespace)
						continue;
					if (reader.NodeType != XmlNodeType.Element)
					{
						Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
						continue;
					}

					var rootnode = new RuntimeRootNode (new XmlType (reader.NamespaceURI, reader.Name, null), view, (IXmlNamespaceResolver)reader);
					XamlParser.ParseXaml (rootnode, reader);
					Visit (rootnode, new HydratationContext { RootElement = view });
					break;
				}
			}
		}
Exemplo n.º 15
0
        public static object Create(XmlReader reader, bool doNotThrow = false)
        {
            object inflatedView = null;

            if (reader != null)
            {
                while (reader.Read())
                {
                    //Skip until element
                    if (reader.NodeType == XmlNodeType.Whitespace)
                    {
                        continue;
                    }
                    if (reader.NodeType == XmlNodeType.XmlDeclaration)
                    {
                        continue;
                    }
                    if (reader.NodeType != XmlNodeType.Element)
                    {
                        Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
                        continue;
                    }

                    var rootnode = new RuntimeRootNode(new XmlType(reader.NamespaceURI, reader.Name, null), null, (IXmlNamespaceResolver)reader);
                    XamlParser.ParseXaml(rootnode, reader);
                    var visitorContext = new HydrationContext
                    {
                        ExceptionHandler = doNotThrow ? e => { } : (Action <Exception>)null,
                    };
                    var cvv = new CreateValuesVisitor(visitorContext);

                    // Visit Parameter Properties to create instance from parameterized constructor
                    var type = XamlParser.GetElementType(rootnode.XmlType, rootnode, null, out XamlParseException xpe);
                    if (xpe != null)
                    {
                        throw xpe;
                    }

                    var ctorInfo =
                        type.GetTypeInfo()
                        .DeclaredConstructors.FirstOrDefault(
                            ci =>
                            ci.GetParameters().Length != 0 && ci.IsPublic &&
                            ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof(ParameterAttribute))));
                    if (ctorInfo != null)
                    {
                        foreach (var parameter in ctorInfo.GetParameters())
                        {
                            var propname =
                                parameter.CustomAttributes.First(ca => ca.AttributeType.FullName == "Tizen.NUI.Binding.ParameterAttribute")?
                                .ConstructorArguments.First()
                                .Value as string;

                            var name = new XmlName("", propname);
                            if (rootnode.Properties.TryGetValue(name, out INode node) && node is ValueNode)
                            {
                                node.Accept(cvv, rootnode);
                            }
                        }
                    }


                    cvv.Visit((ElementNode)rootnode, null);
                    inflatedView = rootnode.Root = visitorContext.Values[rootnode];
                    visitorContext.RootElement = inflatedView as BindableObject;

                    Visit(rootnode, visitorContext);
                    break;
                }
            }
            return(inflatedView);
        }