Specific control syntax
In the following sections, we will explore each type of control. We'll begin with the simpler types such as PushButton
and Text
, and then move on to complex controls such as SelectionTree
and ProgressBar
.
PushButton
A button is one of the most basic types of controls and the one you'll probably use the most. In WiX, it's created by setting the Control
element's Type
attribute to PushButton
. Use the Text
attribute to set its label:
<Control Id="MyButton" Type="PushButton" Text="Click Me!" X="50" Y="50" Height="17" Width="75"> <Publish Event="EndDialog" Value="Exit" /> </Control>
The following screenshot is what it looks like:
You always need to add a Publish element inside it or else the button won't do anything. The Publish
element executes an action, called a control event, when the button is clicked. In the last example, I'm calling the EndDialog
event with a value of Exit
to quit the install. A value of Return
would have...