MonoTouch.Dialog 命名空间

简化了用户界面的创建。

ActivityElement

可用于显示活动指示器的元素。

AlignmentAttribute

将此属性应用于属性和字段,以指示 BindingContext 应如何对齐行上的文本。

BadgeElement

此元素可用于显示包含一些文本的图像

BaseBooleanImageElement

此类用于以图像的形式呈现字符串 + 状态。

BaseBooleanImageElement.TextWithImageCellView

自定义 UITableViewCell,用于显示包含 BaseBooleanImageElement) 使用的图像 (的文本。

BindingContext

用于将结构和类映射到 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 是光泽/玻璃按钮。 用户代码可以使用目标,也可以订阅点击事件。 颜色通过分配给 NormalColor、HighlightedColor 和 DisabledColor 属性进行自定义

GraphicsUtil

MonoTouch.Dialog 元素使用的图形实用工具

Group

根元素用于在需要呈现摘要 (复选框计数或所选单选组) 时提取信息。

HtmlAttribute

简化了用户界面的创建。

HtmlElement

用于显示将在选中时启动 Web 浏览器的单元格。

ImageElement

用于从本地照片库中选取图像的元素。

ImageStringElement

显示带有字符串的缩略图的元素,不可样式。

JsonElement

从 Json 源实例化的 RootElement。

LoadMoreElement

一个元素,该元素在点击时表示正在加载更多数据。

MessageElement

用于显示类似邮件的记录的元素,其中包含发件人、主题、日期、已读/未读状态。

MessageSummaryView

简化了用户界面的创建。

MultilineAttribute

简化了用户界面的创建。

MultilineElement

简化了用户界面的创建。

OnTapAttribute

简化了用户界面的创建。

OwnerDrawnElement

简化了用户界面的创建。

PasswordAttribute

简化了用户界面的创建。

RadioElement

简化了用户界面的创建。

RadioGroup

捕获有关 RootElement 中互斥元素的信息

RadioSelectionAttribute

简化了用户界面的创建。

RangeAttribute

简化了用户界面的创建。

RefreshTableHeaderView

简化了用户界面的创建。

RootElement

RootElement 负责显示完整的配置页。

SearchChangedEventArgs

简化了用户界面的创建。

Section

节包含 MonoTouch.Dialog 呈现的单个元素实例

SectionAttribute

在基于反射的 UI 上,可以将此属性应用于成员以启动新分区。

SkipAttribute

将此属性应用于属性或字段,使 BindingContext 在生成 UI 时忽略此对象

StringElement

字符串元素可用于呈现单元格中的一些文本,这些文本可以选择性地响应点击事件。

StyledMultilineElement

简化了用户界面的创建。

StyledStringElement

StringElement 的一个版本,可以使用多个格式设置选项进行样式设置,并且可以通过 UIImage 参数或从 net 下载来呈现图像或背景图像。

TimeAttribute

应用于 DateTime 对象的属性以指示使用时间选择器完成呈现。

TimeElement

可用于编辑时间的元素

UIViewElement

此元素可用于插入任意 UIView

接口

IColorizeBackground

此接口由元素实现,这些元素需要在向用户显示单元格之前更新其单元格背景属性。 这是正确呈现单元格的 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 核心入口点是一个名为 的 DialogViewControllerUIViewController。 从 类型 RootElement 为 或 JsonElement的对象初始化此 对象的实例。

我们已包含 MonoTouch.Dialog 的一个版本,但已将程序集重命名为MonoTouch.Dialog-1.dll,以防止用户(可能具有 MonoTouch.Dialog 的修改副本或具有现有工作设置)发生任何问题。

若要将 MonoTouch.Dialog 用于项目,只需从项目中的“编辑引用”菜单项添加对MonoTouch.Dialog-1.dll的引用。

如果要使用自己的 MonoTouch.Dialog 副本,仍可以使用 公开可用的 MonoTouch.Dialog 或你自己的分叉版本。