Assign binding path at runtime in WPF DataTemplate
- by Abiel
I am writing a WPF program in C# in which I have a ListView for which the columns will be populated at runtime. I would like to use a custom DataTemplate for the GridViewColumn objects in the ListView.
In the examples I have seen where the number of columns is fixed in advance, a custom DataTemplate is often created using something like the XAML…