Switch Properties

Properties of a control that the user can drag back and forth to switch between two exclusive choices.

The Switch control is supported for these platforms:

Property Description
Label
  • Label – text identifying the control on the user interface.
  • Label position – position of the label in relation to the control it describes.
Label position Position of the label in relation to the control it describes. LEFT (default), RIGHT, TOP, or HIDDEN.
Input Data Binding
  • Keyunique identifier within the current scope, used when setting or retrieving a value. Click New key to create a new key for the control.
    Note: If the value is not unique, the Problems view reports a missing key error.
  • Default value – default value for the control.
Read only Specifies that the control is read-only. Default: unselected.
Note: The read-only property is not supported on the Windows Mobile platform for the Checkbox, Slider, and Choice controls.
Toggle Options Settings are required for all these properties:
  • On Value
  • Off Value
  • On Display
  • Off Display

On Display and Off Display are the text labels for each slider position (for example, "Yes" and "No"). On Value and Off Value are the code that you associate with each position (for example, true and false).