Skip to content

PrepareContainerHandler<TContainer,TItem> delegate

Configures an item container once its content is bound, or releases what such a configuration took. The context owns the lifetime of anything registered through it.

Guide: C# Markup guide

public delegate void PrepareContainerHandler<in TContainer, in TItem>(TContainer container,
TItem item, int index, TemplateContext context);
parameter description
container The container holding the item.
item The item bound to the container.
index The item’s index.
context The container’s template context. Bindings and event subscriptions registered on it are undone before the next item is bound, so registering on every call is correct.