是否有任何现有的扩展,或者在 monotouch.dialog 中以与 StyledStringElement 样式类似的方式向 RootElement 添加样式是否相当简单。
基本上我想向 RootElement 添加图像或徽章,以指示子视图中的详细信息类型,例如添加成功、警告、错误、信息类型的图像 - 所以用户可能只对点击详细信息感兴趣没有完全成功。
所以理想情况下我可以编写这样的代码......
UIImage imageSuccess = ImageLoader.DefaultRequestImage (new Uri ("file://" + Path.GetFullPath ("Images/Success.png")), null);
var root = new RootElement("Root") {
Image = imageSuccess,
Accessory = UITableViewCellAccessory.DetailDisclosureButton,
new Section (){
new BooleanElement ("Airplane Mode", false),
new RootElement ("Notifications") {
new Section (null, "Turn off Notifications")
{
new BooleanElement ("Notifications", false)
}
}}
};
感谢您的任何帮助或指点。