Edit

Share via


MessageElement Class

Definition

Element to display a mail message-like record with sender, subject, date, read/unread statuses.

public class MessageElement : MonoTouch.Dialog.Element, MonoTouch.Dialog.IElementSizing
type MessageElement = class
    inherit Element
    interface IElementSizing
Inheritance
MessageElement
Implements

Remarks

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
}

Constructors

MessageElement()

Default constructor

MessageElement(Action<DialogViewController,UITableView,NSIndexPath>)

Fields

Body

The text to show as the body of the element, it shows up grey.

Caption

The caption to display for this given element

(Inherited from Element)
Date

The date to display.

MessageCount

The number to show as a badge as number of messages in the thread.

NewFlag

Whether this message should be displayed as a new item or not.

Parent

Handle to the container object.

(Inherited from Element)
Sender

Text to use for the sender.

Subject

Text to show as the subject

Properties

CellKey

Subclasses that override the GetCell method should override this method as well

(Inherited from Element)
IndexPath

Returns the IndexPath of a given element. This is only valid for leaf elements, it does not work for a toplevel RootElement or a Section of if the Element has not been attached yet.

(Inherited from Element)

Methods

Deselected(DialogViewController, UITableView, NSIndexPath) (Inherited from Element)
Dispose() (Inherited from Element)
Dispose(Boolean) (Inherited from Element)
GetActiveCell() (Inherited from Element)
GetCell(UITableView)
GetContainerTableView() (Inherited from Element)
GetHeight(UITableView, NSIndexPath)
GetImmediateRootElement()

If the cell is attached will return the immediate RootElement

(Inherited from Element)
Matches(String)
Selected(DialogViewController, UITableView, NSIndexPath)
Summary()

Returns a summary of the value represented by this object, suitable for rendering as the result of a RootElement with child objects.

(Inherited from Element)

Events

Tapped

Event raised when the user taps on the cell.

Applies to