C# Class MonoTouch.Dialog.RootElement

RootElements are responsible for showing a full configuration page.
At least one RootElement is required to start the MonoTouch.Dialogs process. RootElements can also be used inside Sections to trigger loading a new nested configuration page. When used in this mode the caption provided is used while rendered inside a section and is also used as the Title for the subpage. If a RootElement is initialized with a section/element value then this value is used to locate a child Element that will provide a summary of the configuration which is rendered on the right-side of the display. RootElements are also used to coordinate radio elements. The RadioElement members can span multiple Sections (for example to implement something similar to the ring tone selector and separate custom ring tones from system ringtones). Sections are added by calling the Add method which supports the C# 4.0 syntax to initialize a RootElement in one pass.
Inheritance: Element, IEnumerable
显示文件 Open project: escoz/MonoMobile.Forms Class Usage Examples

Public Properties

Property Type Description
CellStyle UITableViewCellStyle
DeselectAutomatically bool
RootControllerType System.Type
RowHeight float
UnevenRows bool
createOnSelected UIViewController>.Func

Public Methods

Method Description
Add ( IEnumerable
sections ) : void
Add ( Section section ) : void
Clear ( ) : void
GetCell ( UITableView tv ) : UITableViewCell
GetEnumerator ( ) : IEnumerator

Enumerator that returns all the sections in the RootElement.

GetHeight ( UITableView tableView, NSIndexPath indexPath ) : float
GetSectionForID ( string name ) : Section
Insert ( int idx, Section section ) : void

Inserts a new section into the RootElement

This inserts the specified list of sections (a params argument) into the root using the Fade animation.

Insert ( int idx, UITableViewRowAnimation anim ) : void

Inserts a new section into the RootElement

This inserts the specified list of sections (a params argument) into the root using the specified animation.

Reload ( Element element, UITableViewRowAnimation animation ) : void
Reload ( Section section, UITableViewRowAnimation animation ) : void
Remove ( Section s ) : void
Remove ( Section s, UITableViewRowAnimation anim ) : void
RemoveAt ( int idx ) : void

Removes a section at a specified location

RemoveAt ( int idx, UITableViewRowAnimation anim ) : void

Removes a section at a specified location using the specified animation

RootElement ( string caption ) : System
RootElement ( string caption, UIViewController>.Func createOnSelected ) : System
RootElement ( string caption, Group group ) : System
RootElement ( string caption, int section, int element ) : System
Selected ( DialogViewController dvc, UITableView tableView, NSIndexPath path ) : void
this ( int idx ) : Section

Protected Methods

Method Description
Dispose ( bool disposing ) : void
MakeViewController ( ) : UIViewController

Creates the UIViewController that will be pushed by this RootElement

PrepareDialogViewController ( UIViewController dvc ) : void

This method does nothing by default, but gives a chance to subclasses to customize the UIViewController before it is presented

Private Methods

Method Description
GetSectionForID ( string name, RootElement element ) : Section
IndexOf ( Section target ) : int
MakeIndexSet ( int start, int count ) : NSIndexSet
PathForRadio ( int idx ) : NSIndexPath
Prepare ( ) : void

Method Details

Add() public method

public Add ( IEnumerable
sections ) : void
sections IEnumerable
return void

Add() public method

public Add ( Section section ) : void
section Section
return void

Clear() public method

public Clear ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

GetCell() public method

public GetCell ( UITableView tv ) : UITableViewCell
tv UITableView
return UITableViewCell

GetEnumerator() public method

Enumerator that returns all the sections in the RootElement.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

GetHeight() public method

public GetHeight ( UITableView tableView, NSIndexPath indexPath ) : float
tableView UITableView
indexPath NSIndexPath
return float

GetSectionForID() public method

public GetSectionForID ( string name ) : Section
name string
return Section

Insert() public method

Inserts a new section into the RootElement
This inserts the specified list of sections (a params argument) into the root using the Fade animation.
public Insert ( int idx, Section section ) : void
idx int /// The index where the section is added ///
section Section
return void

Insert() public method

Inserts a new section into the RootElement
This inserts the specified list of sections (a params argument) into the root using the specified animation.
public Insert ( int idx, UITableViewRowAnimation anim ) : void
idx int /// The index where the section is added ///
anim UITableViewRowAnimation /// The type. ///
return void

MakeViewController() protected method

Creates the UIViewController that will be pushed by this RootElement
protected MakeViewController ( ) : UIViewController
return UIViewController

PrepareDialogViewController() protected method

This method does nothing by default, but gives a chance to subclasses to customize the UIViewController before it is presented
protected PrepareDialogViewController ( UIViewController dvc ) : void
dvc UIViewController
return void

Reload() public method

public Reload ( Element element, UITableViewRowAnimation animation ) : void
element Element
animation UITableViewRowAnimation
return void

Reload() public method

public Reload ( Section section, UITableViewRowAnimation animation ) : void
section Section
animation UITableViewRowAnimation
return void

Remove() public method

public Remove ( Section s ) : void
s Section
return void

Remove() public method

public Remove ( Section s, UITableViewRowAnimation anim ) : void
s Section
anim UITableViewRowAnimation
return void

RemoveAt() public method

Removes a section at a specified location
public RemoveAt ( int idx ) : void
idx int
return void

RemoveAt() public method

Removes a section at a specified location using the specified animation
public RemoveAt ( int idx, UITableViewRowAnimation anim ) : void
idx int /// A ///
anim UITableViewRowAnimation /// A ///
return void

RootElement() public method

public RootElement ( string caption ) : System
caption string
return System

RootElement() public method

public RootElement ( string caption, UIViewController>.Func createOnSelected ) : System
caption string
createOnSelected UIViewController>.Func
return System

RootElement() public method

public RootElement ( string caption, Group group ) : System
caption string
group Group
return System

RootElement() public method

public RootElement ( string caption, int section, int element ) : System
caption string
section int
element int
return System

Selected() public method

public Selected ( DialogViewController dvc, UITableView tableView, NSIndexPath path ) : void
dvc DialogViewController
tableView UITableView
path NSIndexPath
return void

this() public method

public this ( int idx ) : Section
idx int
return Section

Property Details

CellStyle public_oe property

public UITableViewCellStyle CellStyle
return UITableViewCellStyle

DeselectAutomatically public_oe property

public bool DeselectAutomatically
return bool

RootControllerType public_oe property

public Type,System RootControllerType
return System.Type

RowHeight public_oe property

public float RowHeight
return float

UnevenRows public_oe property

public bool UnevenRows
return bool

createOnSelected public_oe property

public Func createOnSelected
return UIViewController>.Func