【发布时间】:2011-08-27 08:35:56
【问题描述】:
是否有任何现有的扩展,或者在 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)
}
}}
};
感谢任何帮助或指点。
【问题讨论】:
标签: xamarin.ios monotouch.dialog