ContentControl won't use DataTemplates
问题 I have two models that i want to represent as directories and files. The models both implement an interface which contains a property string Name {get;} . public interface INode { string Name { get; } string Path { get; } } public class Directory : INode { public Directory(string name, string path) { this.Name = name; this.Path = path; } public string Name { get; } public string Path { get; } } public class File : INode { public File(string name, string path) { this.Name = name; this.Path =