Element.OnChildRemoved(Element, Int32) Method

Definition

Raises the ChildRemoved event. Implement this method to add class handling for this event

C#
protected virtual void OnChildRemoved (Microsoft.Maui.Controls.Element child, int oldLogicalIndex);

Parameters

child
Element

The child element that's been removed.

oldLogicalIndex
Int32

The child's element index in the logical tree.

Remarks

This method has no default implementation. You should still call the base implementation in case an intermediate class has implemented this method. If not debugging, the logical tree index will not have any effect.

Applies to

Product Versions
.NET MAUI 8, 9