Esempio n. 1
0
        public static LinqBindingNode GetSlotModifyNode(Application application, UIElement rootElement, UIElement element, UIElement innerContext, int createdId, int enabledId, int updatedId, int lateId)
        {
            LinqBindingNode node = s_NodePool.Get();

            node.Initialize(rootElement, element, innerContext);

            // todo -- profile this against skip tree
            UIElement ptr = element.parent;

            while (ptr != null)
            {
                if (ptr.bindingNode != null)
                {
                    node.parent = ptr.bindingNode;
                    break;
                }

                ptr = ptr.parent;
            }

            node.referencedContexts    = new UIElement[1];
            node.referencedContexts[0] = innerContext;

            node.SetBindings(application, rootElement, createdId, enabledId, updatedId, lateId);

            return(node);
        }
Esempio n. 2
0
        public static LinqBindingNode GetSlotNode(Application application, UIElement rootElement, UIElement element, UIElement innerContext, int createdId, int enabledId, int updatedId, int lateId, string slotName, TemplateScope templateScope, int slotContextSize)
        {
            LinqBindingNode node = s_NodePool.Get();

            node.Initialize(rootElement, element, innerContext);

            // todo -- profile this against skip tree
            UIElement ptr = element.parent;

            while (ptr != null)
            {
                if (ptr.bindingNode != null)
                {
                    node.parent = ptr.bindingNode;
                    break;
                }

                ptr = ptr.parent;
            }

            node.InitializeContextArray(slotName, templateScope, slotContextSize);

            node.SetBindings(application, rootElement, createdId, enabledId, updatedId, lateId);

            return(node);
        }