ListViewBase.ContainerContentChanging Event

Definition

Occurs when the data item associated with a UI container changes.

Equivalent WinUI event: Microsoft.UI.Xaml.Controls.ListViewBase.ContainerContentChanging.

// Register
event_token ContainerContentChanging(TypedEventHandler<ListViewBase, ContainerContentChangingEventArgs const &> const& handler) const;

// Revoke with event_token
void ContainerContentChanging(event_token const* cookie) const;

// Revoke with event_revoker
ContainerContentChanging_revoker ContainerContentChanging(auto_revoke_t, TypedEventHandler<ListViewBase, ContainerContentChangingEventArgs const &> const& handler) const;
public event TypedEventHandler<ListViewBase,ContainerContentChangingEventArgs> ContainerContentChanging;
function onContainerContentChanging(eventArgs) { /* Your code */ }
listViewBase.addEventListener("containercontentchanging", onContainerContentChanging);
listViewBase.removeEventListener("containercontentchanging", onContainerContentChanging);
- or -
listViewBase.oncontainercontentchanging = onContainerContentChanging;
Public Custom Event ContainerContentChanging As TypedEventHandler(Of ListViewBase, ContainerContentChangingEventArgs) 
<listViewBase ContainerContentChanging="eventhandler" />

Event Type

TypedEventHandler<ListViewBase,ContainerContentChangingEventArgs>

Remarks

This event is raised only if the list or grid's ItemsPanel is an ItemsStackPanel or ItemsWrapGrid. If you replace the ItemsPanel with another panel, the event is not raised.

For info and examples, see the Update ListView and GridView items incrementally section of Optimize ListView and GridView.

For more examples, download the XAML GridView grouping and SemanticZoom sample.

Applies to

See also