Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

LogicalTreeHelper Class

Provides static helper methods for logical tree element queries.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public static class LogicalTreeHelper
public final class LogicalTreeHelper
public final class LogicalTreeHelper
You cannot use this managed class in XAML.

The LogicalTreeHelper class provides methods that you can use to return child collections of elements, or specific elements from within subnodes of the logical tree. However, most of the element tree operations that you typically perform are also exposed by similar methods or properties on FrameworkElement or FrameworkContentElement. For example, try the following:

  • Instead of calling the static GetChildren method, which returns an enumerator for the logical child elements, use the dedicated collection exposed in the content model for that element type. Nearly all elements that support a content model expose some property that contains the collection of child elements, and provides collection interface support directly on that collection.

  • Instead of calling the static FindLogicalNode method to obtain a child element by specifying its name, call the FrameworkElement.FindName or FrameworkContentElement.FindName method on specific elements.

System.Object
  System.Windows.LogicalTreeHelper
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.