Extension Methods
Various extension methods are provided for several common .NET types.
Important
The ActiproSoftware.Windows.Controls.Extensions namespace must be imported for the extensions described below to be available.
Tip
The Core Library defines many additional Extension Methods for common types that are not associated with a UI framework.
Control Extensions
The ControlExtensions type contains extension methods for the Control type. Some of the most frequently used extension methods are highlighted below. Refer to the API documentation for additional methods.
| Member | Description |
|---|---|
| FindAncestorOfType<T> | Finds the first ancestor of the given type in the logical tree. |
| FindDescendantOfType<T> | Finds the first descendant of the given type in the logical tree. |
| GetAncestors | Enumerates the ancestors of an object in the logical tree and can be easily combined with LINQ queries. |
| GetDescendants | Enumerates the descendants of an object in the logical tree and can be easily combined with LINQ queries. |
ILogicalTreeNode Extensions
The ILogicalTreeNodeExtensions type contains extension methods for the ILogicalTreeNode interface that is utilized by many Actipro controls to compose the individual elements of a control. Some of the most frequently used extension methods are highlighted below. Refer to the API documentation for additional methods.
| Member | Description |
|---|---|
| FindLogicalAncestorOfType<T> | Finds the first ancestor of the given type in the visual tree. |
| FindLogicalDescendantOfType<T> | Finds the first descendant of the given type in the visual tree. |
| GetLogicalAncestors | Enumerates the ancestors of a visual in the visual tree and can be easily combined with LINQ queries. |
| GetLogicalDescendants | Enumerates the descendants of a visual in the visual tree and can be easily combined with LINQ queries. |