我有一个类,像这样描述了C#中的字段、方法等:
public class CSharpType
{
public string Name { get; private set; }
public List<CSharpMethod> Methods { get; private set; }
public List<CSharpField> Fields { get; private set; }
public List<CSharpProperty> Properties { get; private set; }
....
}
返回的CSharpType集合是由以下内容组成:
public List<CSharpType> TypeCollection
{
get
{
TypeCollection kolekcjaTypow = metricsCollection.Types;
Dictionary<string, CSharpType> typy = kolekcjaTypow.TypeDictionary;
var result = typy.Values.ToList();
return result;
}
}
每个字段、方法和属性都有一个“名称”属性,我想要一个TreeView(例如):
Person
+ Fields
+ field1 name from Fields collection
+ field2 name from Fields collection
...
+ Methods
....
+ Properties
XAML应该长什么样?谢谢你的帮助。