Question

I have a DataTemplate defined in XAML. I want to customize it and give it to DataGridTemplateColumn.CellTemplate. But when I call LoadContent(), the VisualTree is still null, instead a UIElement tree is returned. After I customize the tree, how can I convert it back to a DataTemplate? Or is there a way to feed the DataGrid cells directly with UIElement?

Was it helpful?

Solution 2

I've learned that once the UI controls are instantiated, it is impossible to convert back to a DataTemplate i.e. FrameworkElementFactory tree.

OTHER TIPS

I think it should help you

Code Project

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top