【发布时间】:2016-01-07 09:50:05
【问题描述】:
我正在向 RootElement 的一部分添加某些值,如下所示:-
NavigationRoot = new RootElement("Menu"){ //Here we create the root of the elements
new Section("Pages"){
new StringElement ("Feed"),
new StringElement ("Messages"),
new StringElement ("Nearby"),
new StringElement ("Events"),
new StringElement ("Friends"),
},
现在,StringElements 是硬编码的。我想将从 API 调用中获取的字符串列表传递给该部分。该列表将是动态的。如何传递此列表以使用列表中的字符串值创建项目部分?
感谢任何帮助。
【问题讨论】:
标签: c# ios list xamarin sections