Thursday, June 28, 2007

WPF: getting a data-bound data template and the items within it

I'm so happy to find out about Rich Strahl's post on how to get the items within a data template that is data-bound to, say, a list box.

It turns out the only way to get an item inside a data template is to programmatically go into the UI hierarchy of the template... not elegant at all!