Share via


Element.OnChildRemoved(Element, Int32) 方法

定义

引发 ChildRemoved 事件。 实现此方法以为此事件添加类处理

protected:
 virtual void OnChildRemoved(Microsoft::Maui::Controls::Element ^ child, int oldLogicalIndex);
protected virtual void OnChildRemoved (Microsoft.Maui.Controls.Element child, int oldLogicalIndex);
abstract member OnChildRemoved : Microsoft.Maui.Controls.Element * int -> unit
override this.OnChildRemoved : Microsoft.Maui.Controls.Element * int -> unit
Protected Overridable Sub OnChildRemoved (child As Element, oldLogicalIndex As Integer)

参数

child
Element

已删除的子元素。

oldLogicalIndex
Int32

逻辑树中的子元素索引。

注解

此方法没有默认实现。 如果中间类实现了此方法,仍应调用基实现。 如果不调试,逻辑树索引将不起作用。

适用于