Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]MVVM Framework
  [Expand]ViewModels
  [Expand]Commands
  [Expand]Behaviors
  [Expand]Services
  [Expand]DXBinding
  [Expand]MIF
   Converters
   ViewLocator
   Messenger
   Data Annotation Attributes
   LayoutTreeHelper
   Weak Event
 [Expand]Controls and Libraries
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

LayoutTreeHelper

The LayoutTreeHelper is a helper class that provides utility methods for iterating through elements of visual and logical trees and searching nodes.

Expanded Retrieving object's visual parents

For accessing the visual parents of an object that is placed in a visual or logical tree, the LayoutTreeHelper provides the LayoutTreeHelper.GetVisualParents function.

This function returns a LINQ compatible collection. It allows you to use the wide capabilities of LINQ methods to access the required nodes of the visual and logical trees.

For instance, to get a specific parent Grid, you can use the following code.

Expanded Retrieving object's visual children

For accessing the visual children of an object, the LayoutTreeHelper provides the LayoutTreeHelper.GetVisualChildren function.

Similar to GetVisualParents, this function also returns a LINQ compatible collection. Thus, you can also use LINQ extension methods to obtain the required child nodes.

Below is a sample code snippet that illustrates how to obtain the child CheckBox named as PART_CheckBox by using the GetVisualChildren function.

Is this topic helpful?​​​​​​​