我有一个从动态对象创建的根元素。当我点击一个元素时,我想获取对象 ID:
var section = new Section("","Select a complex and then a property");
var root = new RootElement("Complexes"){section};
foreach(Complex complex in complexes){
var line = new RootElement(complex.Name);
foreach(Property property in complex.Properties){
line.Add(new Section(property.Name,"Select the property to work"){
new StringElement(property.Description, delegate {
// NEED HELP HERE!!! here I want to get property.Id
})
});
}
section.Add(line);
}
this.Root = root;
有什么线索吗?非常感谢。