Here’s a simple function you can use to get a specific child from a given visual tree. For example, you may want to get a handle to the scrollviewer in a listbox control. Here’s how you’d use the function to do that :- ScrollViewer scrollViewer = FindChildControl<ScrollViewer>(searchResultsListbox); And here’s the function listing :- private T [...]
Entries from August 2007
A generic function to find a visual child from a visual tree
August 7th, 2007 · 2 Comments
Tags: WPF (Avalon)