我正在使用MonoTouch.Dialog創建類似設置的頁面。下面的linq創建一組RootElement,每個RootElements都有一個具有一組RadioEventElements(爲創建OnSelected事件而創建的RadioElement的子類)的部分。有沒有辦法爲RadioGroup設置BackgroundColor?
// initialize other phone settings by creating a radio element list for each phone setting
var elements = (from ps in PhoneSettings.Settings.Keys select (Element) new RootElement(ps, new RadioGroup(null, 0))).ToList();
// loop through the root elements we just created and create their substructure
foreach (RootElement rootElement in elements)
{
rootElement.Add(new Section()
{
(from val in PhoneSettings.Settings[rootElement.Caption].Values select (Element) new RadioEventElement(val.Name)).ToList()
});
// ...
}
一個我實現的設置是一個「主題」 - 目前僅僅是在應用程序中的各種屏幕的背景顏色。通過將TableView.BackgroundColor屬性設置爲所需的顏色,我可以正確設置每個頁面的樣式......除了在導航到收音機組時由父DialogViewController自動創建並推送的新DialogViewController。
是否有任何方式來(或至少設置背景顏色)這個孩子DialogViewController?