Ejemplo n.º 1
0
        protected override void RecycleElementCore(ElementFactoryRecycleArgs args)
        {
            var element = args.Element;
            var owner   = args.Parent;
            var key     = (String)(element as FrameworkElement).Tag;

            Debug.Assert(key != null);
            RecyclePool.PutElement((FrameworkElement)element, key, owner);


#if DEBUG
            var containerAsFE = (FrameworkElement)element;

            switch (key)
            {
            case RecipeGroupType:
            {
                var repeater = (ItemsRepeater)containerAsFE.FindName("groupLayout");
                var id       = RepeaterTestHooks.GetLayoutId(repeater.Layout);
                RepeaterTestHooks.SetLayoutId(repeater.Layout, id + "*");
                break;
            }

            case YearType:
            {
                var repeater = (ItemsRepeater)containerAsFE.FindName("yearLayout");
                var id       = RepeaterTestHooks.GetLayoutId(repeater.Layout);
                RepeaterTestHooks.SetLayoutId(repeater.Layout, id + "*");
                break;
            }
            }
#endif
        }
Ejemplo n.º 2
0
            protected override void RecycleElementCore(ElementFactoryRecycleArgs args)
#endif
            {
                var repeater = (ItemsRepeater)((FrameworkElement)args.Element).FindName("groupLayout");

                if (repeater != null)
                {
                    // Make sure all elements are cleared.
                    repeater.Layout = null;
                }

                _recyclePool.PutElement(args.Element, (string)((FrameworkElement)args.Element).Tag, args.Parent);
            }
Ejemplo n.º 3
0
 protected override void RecycleElementCore(ElementFactoryRecycleArgs args)
 {
 }
Ejemplo n.º 4
0
 public void RecycleElement(ElementFactoryRecycleArgs args)