Create/Remove a single binding expression from a Binding class which has the information
コード例 #1
0
        public global::Android.Views.View OnCreateView(string name, Context context, IAttributeSet attrs)
        {
            String viewFullName = string.Format("android.widget.{0}", name); // this is bad as it will only do the normal controls....
            var    id           = attrs.GetAttributeValue(BindingConstants.BindingNamespace, BindingConstants.IdString);

            var view = _layoutInflater.CreateView(viewFullName, null, attrs);

            if (view == null || id == null)
            {
                return(view);
            }

            var node = FindNodeWithId(_rootnode, id);

            if (node != null)
            {
                BindingFactory bf = new BindingFactory();
                foreach (var property in node.Value.Properties)
                {
                    Add(view, property.Value, node.Value);
                }
            }
            return(view);
        }
コード例 #2
0
        public global::Android.Views.View OnCreateView(string name, Context context, IAttributeSet attrs)
        {
            String viewFullName = string.Format("android.widget.{0}", name); // this is bad as it will only do the normal controls....
            var id = attrs.GetAttributeValue(BindingConstants.BindingNamespace, BindingConstants.IdString);

            var view = _layoutInflater.CreateView(viewFullName, null, attrs);

            if (view == null || id == null)
            {
                return view;
            }

            var node = FindNodeWithId(_rootnode, id);

            if (node != null)
            {
                BindingFactory bf = new BindingFactory();
                foreach (var property in node.Value.Properties)
                {
                    Add(view, property.Value, node.Value);
                }

            }
            return view;
        }