protected override void RecycleElementCore(ElementFactoryRecycleArgs args) { _recordedRecycleElementCalls.Add(new RecycleElementCallInfo(args.Element, args.Parent)); if (ClearElementFunc != null) { ClearElementFunc(args.Element, args.Parent); } }
protected override void RecycleElementCore(ElementFactoryRecycleArgs context) { base.RecycleElementCore(context); if (ClearElementFunc != null) { ClearElementFunc(context.Element, context.Parent); } int elementIndex = _realizedElements.IndexOf(context.Element); if (elementIndex != -1) { _realizedElements.RemoveAt(elementIndex); _realizedElementIndices.RemoveAt(elementIndex); } else if (ValidateElementIndices) { throw new InvalidOperationException("Cannot clear an element that has not been created or already been cleared."); } }
protected override void RecycleElementCore(ElementFactoryRecycleArgs args) { }
protected override void RecycleElementCore(ElementFactoryRecycleArgs args) { XamlBindingHelper.GetDataTemplateComponent(args.Element).Recycle(); _recyclePool.PutElement(args.Element, key, args.Parent); }
/* static */ public static object CreateRepeaterElementFactoryRecycleArgs() { var instance = new ElementFactoryRecycleArgs(); return(instance); }
protected override void RecycleElementCore(ElementFactoryRecycleArgs args) { var container = args.Element as Button; container.Content = null; }