This documentation is archived and is not being maintained.

Overriding Properties

ASP.NET mobile Web applications can specify the property values of their controls for particular hardware based on the hardware's capabilities. For example, your application might need a Label control to display longer text on one set of devices and more abbreviated text on another. Each control provides a set of properties that the application can override on a per-device basis.

To override particular properties of a control, you must first define device filters. Apply the device filters to the control to pinpoint the set of devices for which you want to define custom property values. Property override values can be edited only for the current device filter. Therefore, you must select the filter that you want to use to override property values, and set it as the current filter. After you select the device filter, the designer enables you to set the property override values for that filter. To set property override values for additional filters, select each filter in turn.

To define property override values

  1. Select the control whose property values you want to override for specific types of devices.
  2. In the Properties window for the control, click the Ellipsis button () next to the PropertyOverrides property. The Property Overrides dialog box appears.
  3. If there are no device filters defined, do the following:
    1. Click the Edit button. The designer displays the Applied Device Filters dialog box.
    2. In the Applied Device Filters dialog box, choose Edit to display the Device Filter Editor dialog box.
    3. Define one or more device filters for the control.
  4. If device filters are defined but not currently applied, apply device filters to the control by using the following steps:
    1. Click the Edit button. The designer displays the Applied Device Filters dialog box.
    2. Apply one or more device filters to the control.
  5. In the Applied Device Filters drop-down list, select the applied device filter for which you want to define property overrides.
  6. In the Device-Specific Properties list, define the property values associated with the selected applied device filter.

See Also

Walkthrough: Customizing for Specific Devices | Property Overrides Dialog Box

Show: