Defining a Button Control
Use
You use this procedure to define the properties and event handlers for a button control. A button control is an event-sensitive area on a tile that allows the user to execute an action. The event handler you write for the button determines the action that is carried out when the button is chosen.
A button control is associated with an unbound anchor in a tile. It cannot be associated with a hyperlink or a data source.
Prerequisites
You have:
-
Added a button control in a tile
-
Switched to the required change list
Procedure
-
In the Solution Explorer , locate the tile in which you want to create a button control, click the tile with the secondary mouse button, and choose View Designer .
-
Open the Toolbox, drag the button control and drop it on the tile.
-
In the Properties panel, enter the required values for the properties.
For information on each of the properties, see Properties of a Button Control .
-
If you do not require a Custom button type, continue with step 5. If you set the Button type to Custom , create an event handler.
-
In the Tile Designer , click the control with the secondary mouse button and choose Add Handler .
The New Event Handler dialog box appears.
-
In the Event field, select onClicked , select the Edit the handler code after creation field, and choose OK .
-
Write the code you require for the event handler.
-
-
Save your entries.
Result
You have defined the properties and event handlers for a button control.
See also: