HierarchicalDataTemplate应用于Field / Property

是否可以将HierarchicalDataTemplate应用于属性? 我知道我可以将它应用于DataType,它可以很好地工作,但是如果我有一个泛型类,那么唯一可区分的元素就是这个类中的枚举。 那么我可以以某种方式在枚举值上应用不同的HierarchicalDataTemplate吗? 映入眼帘, 于尔根     
已邀请:
是的,你可以使用
DataTemplateSelector
。请参阅以下链接:http://msdn.microsoft.com/en-us/library/ms742521.aspx#Styling_StyleSelection。有一个如何根据数据对象的属性选择模板的示例。     

要回复问题请先登录注册