ExtensionMethods.TraverseVisualTree<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Execute a delegate action on all visual descendants of this dependency object of a particular type.
USE SPARINGLY.
This method walks the entire tree. Use of this method on large trees or excessively will introduce a performance hit.
public:
generic <typename T>
where T : class[System::Runtime::CompilerServices::Extension]
static void TraverseVisualTree(System::Windows::DependencyObject ^ obj, Action<T> ^ action);
public static void TraverseVisualTree<T> (this System.Windows.DependencyObject obj, Action<T> action) where T : class;
static member TraverseVisualTree : System.Windows.DependencyObject * Action<'T (requires 'T : null)> -> unit (requires 'T : null)
<Extension()>
Public Sub TraverseVisualTree(Of T As Class) (obj As DependencyObject, action As Action(Of T))
Type Parameters
- T
Parameters
- obj
- DependencyObject
- action
- Action<T>