FrameworkContentElement.RemoveLogicalChild(Object) 方法

定义

从该元素的逻辑树中移除指定的元素。Removes the specified element from the logical tree for this element.

protected public:
 void RemoveLogicalChild(System::Object ^ child);
protected internal void RemoveLogicalChild (object child);
member this.RemoveLogicalChild : obj -> unit
Protected Friend Sub RemoveLogicalChild (child As Object)

参数

child
Object

要移除的元素。The element to remove.

注解

添加对子集合支持时,此 API 主要与类派生方案相关。This API is mainly relevant for class deriving scenarios, when adding support for child collections.

大多数 FrameworkContentElement 派生类公开专用集合,这些集合负责 (例如, InlinesSpan 类上; 在 Blocks Section 类) 上。Most FrameworkContentElement derived classes expose dedicated collections that are responsible for containment (for example, Inlines on the Span class; Blocks on the Section class). 从这类类派生通常可以避免任何需要直接操作逻辑树。Deriving from such classes typically can avoid any need to manipulate the logical tree directly.

适用于

另请参阅