Add content to an Expander control
The Expander control is used with a Panel or Grid control.
Before you begin
Note: Ensure that Expander control Height property is set to Auto.
Procedure
- In the navigator, click .
- From the Forms list, select the resource you want to work with.
- Click .
- Click the Toolbox tab.
- Expand the control group you want to work with.
- Click and drag the control to the desired position in the Designer.Note: To apply the properties of a control to another control, click and drag the control to another control in the document tree. The Applying <control (control name)> to Target dialog box appears where you can select the option you want to use to apply to the control.
- Add a grid or panel.
- Right-click the control in either the Designer or the document tree, and then select Edit Layer.
- Or -
Double-click the control in the document tree.The control displays in the designer with an orange border, indicating that it is the active layer. - Add the appropriate controls to the grid or panel.When you make another control the active layer, you cannot select the controls that were added in other active layers because they are now part of an inactive layer. In order to change these controls, you must make that layer active again.
- Reset the top level control to be the active layer.
- Right-click the grid/panel control, and then select Cut.
- In the Document Tree, right-click the Expander control, and then select Paste Special.The Applying <control> to Target Expander dialog box appears.
- Select the Child of Expander option, and then click OK.When the project is built, you can click the drop-down arrow on the expander to display the grid/panel.Important: You can add only one grid or panel control to an expander. If a grid or panel control already exists as content in your expander control, adding a new grid or panel overwrites the existing one.
- Configure the properties, as required.Note: To view the full list of properties, select the Advanced check box.
- Save the form or user display.
Click Save on the... To save... toolbar locally for WPF forms; to the server for Silverlight forms title bar to the server for WPF forms