MonoTouch.Dialog 命名空間
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
簡化使用者介面的建立。
類別
ActivityElement |
可用來顯示活動指標的專案。 |
AlignmentAttribute |
將此屬性套用至屬性和欄位,以指示 BindingCoNtext 如何對齊資料列上的文字。 |
BadgeElement |
此元素可用來顯示含有一些文字的影像 |
BaseBooleanImageElement |
這個類別用來呈現以影像形式呈現字串 + 狀態。 |
BaseBooleanImageElement.TextWithImageCellView |
自訂 UITableViewCell,以 BaseBooleanImageElement) 所使用的影像 (顯示文字。 |
BindingContext |
Helper 類別,用來將結構和類別對應至 MonoTouch.Dialog 中的使用者介面元素。 |
BooleanElement |
用來在畫面上顯示切換。 |
BooleanImageElement |
這個類別用來呈現以影像形式呈現字串 + 狀態。 |
BoolElement |
BoolElement 和 BaseBooleanImageElement 的基類 |
CaptionAttribute |
在反映型 UI 上,這個屬性可以套用至成員,以設定專案的標題。 |
CheckboxAttribute |
在反映型 UI 上,此屬性可以套用至布林值,以使用核取方塊來呈現布林值。 |
CheckboxElement |
可用來做為核取方塊的專案 |
DateAttribute |
套用至 DateTime 物件的屬性,指示使用日期選擇器完成轉譯。 |
DateElement |
可用來編輯日期的專案。 |
DateTimeElement |
可用來編輯日期和時間的專案。 |
DialogViewController |
DialogViewController 是使用 MonoTouch.Dialog 的主要進入點,它會為 UITableViewController 提供簡化的 API。 |
DialogViewController.SizingSource |
當包含的專案預期具有不同的高度時,MonoTouch.Dialog 所使用的預設 UITableViewSource。 |
DialogViewController.Source |
當包含的所有元素都有固定高度時,MonoTouch.Dialog 所使用的預設 UITableViewSource。 |
Element |
MonoTouch.Dialog 中所有專案的基類 |
EntryAttribute |
將此屬性套用至字串,以產生編輯資料列。 |
EntryElement |
可用來輸入文字的專案。 |
FloatElement |
用來在畫面上顯示滑杆。 |
GlassButton |
GlassButton 是詞彙/玻璃按鈕。 使用者程式碼可以使用目標,也可以訂閱 Tapped 事件。 色彩是藉由指派給 NormalColor、HighlightedColor 和 DisabledColor 屬性來自訂 |
GraphicsUtil |
MonoTouch.Dialog 元素所使用的圖形公用程式 |
Group |
根項目用來擷取需要轉譯摘要 (核取方塊計數或選取的單選群組) 時擷取資訊。 |
HtmlAttribute |
簡化使用者介面的建立。 |
HtmlElement |
用來顯示在選取時啟動網頁瀏覽器的儲存格。 |
ImageElement |
要從本機相片庫挑選影像的專案。 |
ImageStringElement |
元素,顯示具有字串的縮圖影像,不可為手寫。 |
JsonElement |
從 Json 來源具現化的 RootElement。 |
LoadMoreElement |
點選時會交集的專案,表示正在載入更多資料。 |
MessageElement |
顯示類似郵件訊息記錄的元素,其中包含寄件者、主旨、日期、讀取/未讀取狀態。 |
MessageSummaryView |
簡化使用者介面的建立。 |
MultilineAttribute |
簡化使用者介面的建立。 |
MultilineElement |
簡化使用者介面的建立。 |
OnTapAttribute |
簡化使用者介面的建立。 |
OwnerDrawnElement |
簡化使用者介面的建立。 |
PasswordAttribute |
簡化使用者介面的建立。 |
RadioElement |
簡化使用者介面的建立。 |
RadioGroup |
擷取 RootElement 中互斥元素的相關資訊 |
RadioSelectionAttribute |
簡化使用者介面的建立。 |
RangeAttribute |
簡化使用者介面的建立。 |
RefreshTableHeaderView |
簡化使用者介面的建立。 |
RootElement |
RootElements 負責顯示完整的組態頁面。 |
SearchChangedEventArgs |
簡化使用者介面的建立。 |
Section |
區段包含 MonoTouch.Dialog 轉譯的個別元素實例 |
SectionAttribute |
在以反映為基礎的 UI 上,此屬性可以套用至成員,以啟動新的區段。 |
SkipAttribute |
將此屬性套用至 Property 或 Field,讓 BindingCoNtext 在產生 UI 時忽略此物件 |
StringElement |
字串元素可用來轉譯儲存格中的某些文字,以選擇性地回應點選事件。 |
StyledMultilineElement |
簡化使用者介面的建立。 |
StyledStringElement |
StringElement 版本,可以使用許多格式設定選項來設定樣式,而且可以從 UIImage 參數或從 net 下載影像或背景影像。 |
TimeAttribute |
套用至 DateTime 物件的屬性,指示使用時間選取器完成轉譯。 |
TimeElement |
可用來編輯時間的專案 |
UIViewElement |
此元素可用來插入任意 UIView |
介面
IColorizeBackground |
此介面是由 Elements 所實作,這些元素需要更新其儲存格 Background 屬性,才能向使用者顯示。 這是正確轉譯儲存格的 iOS 3 需求。 |
IElementSizing |
此介面是由具有不同高度的元素類別所實作 |
列舉
RefreshViewStatus |
簡化使用者介面的建立。 |
UIViewElement.CellFlags |
簡化使用者介面的建立。 |
委派
DialogViewController.SearchTextEventHandler |
簡化使用者介面的建立。 |
備註
MonoTouch.Dialog 是建立對話方塊和顯示資料表型資訊的基礎,不需要為使用者介面撰寫數十個委派和控制器。 MonoTouch.Dialog 是實作 UITableView 的保留系統,而不是 UITableView 的隨選本質。
基礎結構提供許多便利性,可讓開發人員建立以虛線 UITableView 為基礎的使用者介面,並投入一小部分的工作。 它提供一組大量的自訂資料格轉譯器和功能,例如提取到重新整理和內建搜尋。
此程式碼片段會產生下列 UI:
return new RootElement ("Settings") {
new Section (){
new BooleanElement ("Airplane Mode", false),
new RootElement ("Notifications", 0, 0) {
new Section (null,
"Turn off Notifications to disable Sounds\n" +
"Alerts and Home Screen Badges for the\napplications below."){
new BooleanElement ("Notifications", false)
}
}},
new Section (){
new RootElement ("Sounds"){
new Section ("Silent") {
new BooleanElement ("Vibrate", true),
},
new Section ("Ring") {
new BooleanElement ("Vibrate", true),
new FloatElement (null, null, 0.8f),
new RootElement ("Ringtone", new RadioGroup (0)){
new Section ("Custom"){
new RadioElement ("Circus Music"),
new RadioElement ("True Blood"),
},
new Section ("Standard"){
from name in "Marimba,Alarm,Ascending,Bark".Split (',')
(Element) new RadioElement (n)
}
},
new RootElement ("New Text Message", new RadioGroup (3)){
new Section (){
from name in "None,Tri-tone,Chime,Glass,Horn,Bell,Electronic".Split (',')
(Element) new RadioElement (n)
}
},
new BooleanElement ("New Voice Mail", false),
new BooleanElement ("New Mail", false),
new BooleanElement ("Sent Mail", true),
}
},
new RootElement ("Brightness"){
new Section (){
new FloatElement (null, null, 0.5f),
new BooleanElement ("Auto-brightness", false),
}
},
new RootElement ("Wallpaper"){ MakeWallPaper (); }
},
new Section () {
new EntryElement ("Login", "Your login name", "miguel"),
new EntryElement ("Password", "Your password", "password", true),
new DateElement ("Select Date", DateTime.Now),
},
}
MonoTouch.Dialog 核心進入點是稱為 的 DialogViewController UIViewController。 您可以從 或 類型的 RootElementJsonElement 物件初始化這個 物件的實例。
我們已包含 MonoTouch.Dialog 的版本,但已將元件重新命名為 MonoTouch.Dialog-1.dll,以防止使用者可能具有 MonoTouch.Dialog 修改複本或變更現有的工作設定。
若要搭配您的專案使用 MonoTouch.Dialog,只需從專案中的 [編輯參考] 功能表項目新增對MonoTouch.Dialog-1.dll的參考。
如果您想要使用自己的 MonoTouch.Dialog 複本,您仍然可以使用 公開可用的 MonoTouch.Dialog 或您自己的分叉版本。