1

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?

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
NS.X.
  • 2,072
  • 5
  • 28
  • 55

2 Answers2

0

I think it should help you

Code Project

Jignesh.Raj
  • 5,776
  • 4
  • 27
  • 56
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