views:

52

answers:

0

I'm using WPF with .NET 3.0.

I have a DataTemplate defined in XAML. I have a ListView with a GridView. I'd like to be able to generate the cell visuals with DataTemplate.LoadContent(), and insert the result into the GridView cell when needed. I need to do this so that I can set additional bindings on the generated visual object. Is it possible?

I can't figure out the right time/place to generate the content and insert it. I've seen some examples online about finding the automatically generated content and replacing it, but the examples use a click event to start the process. Ideally there would be a GridViewColumn.OnCellTemplateContentRequested event...