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
?
Asked
Active
Viewed 530 times
1

Dave Clemmer
- 3,741
- 12
- 49
- 72

NS.X.
- 2,072
- 5
- 28
- 55
2 Answers
0
I've learned that once the UI controls are instantiated, it is impossible to convert back to a DataTemplate
i.e. FrameworkElementFactory
tree.

Dave Clemmer
- 3,741
- 12
- 49
- 72

NS.X.
- 2,072
- 5
- 28
- 55