How to add handler in dynamic datatemplate
- by Phillip Ngan
I am successfully declaring a data template in a code behind as follows:
private static DataTemplate CreateTemplate(string sortMemberPath, HorizontalAlignment horzAlignment)
{
const string xamlFormat
=
"<DataTemplate xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" >"
+…