是否存在任何現有的擴展,或者是否可以使用類似於StyledStringElement的方式向monotouch.dialog中的RootElement添加樣式相當直接。在monotouch.dialog中,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)
}
}}
};
感謝任何幫助或指針。
謝謝您的回答,我只是想知道如果有什麼我自己寫之前就已經存在了,但是因爲根元素能夠如此輕易地被置於其他部分等裏面,他們已經有一個默認的顯示在這些情況下,我只是想改變這個默認顯示。 現在我分別創建每個子元素,並使用觸摸事件來根據需要顯示它們,而不是讓monotouch.dialog自動爲我完成這一切。 有一天,我可能會看着做我最初想要的東西:) – Sean 2011-06-12 08:53:37
根元素需要樣式化 - 例如,當使用根元素定義子根目錄時更改輔助視圖。 – iwayneo 2014-02-14 11:13:51