Dialog.RootElement Class
RootElements are responsible for showing a full configuration page.

See Also: RootElement Members

Syntax

public class RootElement : Element, IEnumerable<Section>

Remarks

At least one RootElement is required to start the Dialogs process. RootElements contain in turn a collection of Dialog.Section objects which in turn contain the various specialized Element instances including other RootElements -- to create nested user interfaces.

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, for example:

c# Example

return new RootElement ("Settings") {
  new Section ("Basic Settings"){
    new BooleanElement ("Airplane Mode", false),
    new BooleanElement ("Happy", true),
  },
  new Section ("Advanced Settings"){
    new BooleanElement ("Attend seminars", true)
    new BooleanElement ("Enjoy coffee", true)
  }
}

Requirements

Namespace: Dialog
Assembly: Dialog-1 (in Dialog-1.dll)
Assembly Versions: 0.0.0.0