protected override UIElement GetOrCreateElementAtCore(int index, ElementRealizationOptions options) { if (m_nonVirtualizingContext.TryGetTarget(out var context)) { return(context.Children[index]); } return(null); }
protected virtual UIElement GetOrCreateElementAtCore(int index, ElementRealizationOptions options) { throw new NotImplementedException(); }
public UIElement GetOrCreateElementAt(int index, ElementRealizationOptions options) { // Calling this way because GetOrCreateElementAtCore is ambiguous. // Use .as instead of try_as because try_as uses non-delegating inner and we need to call the outer for overrides. return(GetOrCreateElementAtCore(index, options)); }
protected override UIElement GetOrCreateElementAtCore(int index, ElementRealizationOptions options) { return(GetOwner().GetElementImpl(index, (options & ElementRealizationOptions.ForceCreate) == ElementRealizationOptions.ForceCreate, (options & ElementRealizationOptions.SuppressAutoRecycle) == ElementRealizationOptions.SuppressAutoRecycle)); }
protected abstract UIElement GetOrCreateElementAtCore(int index, ElementRealizationOptions options);