FrameworkElement.LogicalChildren 属性

定义

获取此元素的逻辑子元素的一个枚举器。Gets an enumerator for logical child elements of this element.

protected public:
 virtual property System::Collections::IEnumerator ^ LogicalChildren { System::Collections::IEnumerator ^ get(); };
protected internal virtual System.Collections.IEnumerator LogicalChildren { get; }
member this.LogicalChildren : System.Collections.IEnumerator
Protected Friend Overridable ReadOnly Property LogicalChildren As IEnumerator

属性值

此元素的逻辑子元素的一个枚举数。An enumerator for logical child elements of this element.

注解

LogicalChildren 允许遍历子元素。LogicalChildren allows you to iterate over child elements. 这适用于可能不具有已定义专用集合但仍包含多个子元素(特别是 FrameworkContentElement 子元素)的元素。This is useful for elements that may not have a defined, dedicated collection but still contain more than one child element, particularly FrameworkContentElement child elements.

有关如何使用 LogicalChildrenAddLogicalChild的详细信息,请参阅WPF 中的树For more information on how to use LogicalChildren and AddLogicalChild, see Trees in WPF.

适用于

另请参阅