MessageElement 类

定义

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

public class MessageElement : MonoTouch.Dialog.Element, MonoTouch.Dialog.IElementSizing
type MessageElement = class
    inherit Element
    interface IElementSizing
继承
MessageElement
实现

注解

var messageSection = new Section ("Message Elements"){
	new MessageElement (msgSelected) { 
		Sender = "Miguel de Icaza (mdeicaza.home@emailserver.com)", 
		Subject = "Re: [Gtk-sharp-list] Glib Timeout and other ways to handle idle",
		Body = "Please bring friends, but make sure that you also bring eggs and bacon",
		Date = DateTime.Now - TimeSpan.FromHours (23),
		NewFlag = true,
		MessageCount = 0
	},
	new MessageElement (msgSelected) { 
		Sender = "Nat Friedman (nfriedman.home@emailserver.com)", 
		Subject = "Pictures from Vietnam",
		Body = "Hey, here are the pictures that I promised from Vietnam",
		Date = new DateTime (2010, 10, 20),
		NewFlag = false,
		MessageCount = 2
	}
};
[...]
void msgSelected (DialogViewController dvc, UITableView tv, NSIndexPath path)
{
	// The message was selected
}

构造函数

MessageElement()

默认构造函数

MessageElement(Action<DialogViewController,UITableView,NSIndexPath>)

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

字段

Body

要显示为元素正文的文本显示为灰色。

Caption

要为此给定元素显示的标题

(继承自 Element)
Date

要显示的日期。

MessageCount

要显示为锁屏提醒的线程中消息数的数字。

NewFlag

此消息是否应显示为新项。

Parent

容器对象的句柄。

(继承自 Element)
Sender

要用于发件人的文本。

Subject

要显示为主题的文本

属性

CellKey

替代 GetCell 方法的子类也应重写此方法

(继承自 Element)
IndexPath

返回给定元素的 IndexPath。 这仅适用于叶元素,如果尚未附加元素,则不适用于 toplevel RootElement 或 的 Section。

(继承自 Element)

方法

Deselected(DialogViewController, UITableView, NSIndexPath)

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

(继承自 Element)
Dispose()

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

(继承自 Element)
Dispose(Boolean)

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

(继承自 Element)
GetActiveCell()

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

(继承自 Element)
GetCell(UITableView)

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

GetContainerTableView()

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

(继承自 Element)
GetHeight(UITableView, NSIndexPath)

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

GetImmediateRootElement()

如果附加了单元格,将返回即时 RootElement

(继承自 Element)
Matches(String)

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

Selected(DialogViewController, UITableView, NSIndexPath)

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

Summary()

返回此对象表示的值的摘要,适合作为具有子对象的 RootElement 的结果进行呈现。

(继承自 Element)

事件

Tapped

用户点击单元格时引发的事件。

适用于