Panels
A Panel control is an ASP.NET mobile control that can be included within a Form control, but is not required. A panel can be used strictly as a grouping mechanism that can be arbitrarily nested within a form or other panel for better organization of controls.
Unlike forms, a panel cannot act as the target of a jump for an application. Also, a panel is not a separate unit of interaction with an application; thus, the ASP.NET can combine panels into a single display, to any level of panel depth, as allowed by the target device.
Use panels to perform the following:
- Define style and flow information for a group of controls and visually group a set of controls together. Panels can be used for style inheritance, allowing child controls within a panel to inherit styles from the panel (subject to the style inheritance rules discussed in the Style Inheritance section of the Styles documentation).
- Use a single Panel control for showing, hiding, enabling, or disabling a set of controls.
- Use an empty Panel control as a container for creating dynamic arbitrary controls.
- Provide ASP.NET with information about how to group controls on a screen. When paginating a form, ASP.NET might keep all controls for a single panel on the same screen.
Note Since Panel.OnInit constructs the templated UI for the control, any control inheriting from Panel that adds controls to the Controls collection during OnInit must call base.OnInit after the controls are added, not before.
See Also
Designing and Rendering Concepts for Mobile Controls | Application Developer's Guide | Pages | Panels | Pagination | Styles