Freigeben über


Applied Device Filters Dialog Box

Use the Applied Device Filters dialog box to add, remove, and prioritize device filters associated with a control.

Hinweis

The Form and Panel container controls do not have an AppliedDeviceFilters item in the Properties window at Design time. Instead, applications apply device filters to container controls using the DeviceSpecific control.

To access this dialog box

  1. In Visual Studio, open or create a new mobile Web page.

  2. Switch to Design view.

  3. From the Mobile Web Forms tab of the Toolbox, drag a control into the mobile form box on the page.

  4. Select the control, and in the Properties window, select the (AppliedDeviceFilters) item, then click the ellipsis button (ASP.NET Mobile Designer ellipse) next to it.

Tasks

UI Elements

  • Available Device Filters
    Use the drop-down list to select an available device filter. To add, delete, or modify filters, click the Edit button to open the Device Filter Editor Dialog Box. Click Add to List to apply a device filter to the control. When you do, the device filter appears in the Applied Device Filters list.

    Hinweis

    The applied device filter named (Default) always results in a successful evaluation. If present, this filter will block all other evaluations below it in the list. This device filter will therefore appear as the last device filter in the Applied Device Filter list. The (Default) filter catches every device that does not match any of the filters above it in the list. For more information about using device filters, see Defining Device Filters.

    Alternatively, you can type in the name of an evaluation method that takes the signature of the evaluator delegate. For more information, see the "Evaluator-Delegate-based Filters" section of the Device-Specific Rendering topic.

  • Applied Device Filters
    Contains the list of applied device filters. Each filter in the list tests for a particular device, a particular type of device, or a particular device characteristic. At run time, the filters are tested one by one from the top to the bottom. The first device filter that results in a successful evaluation determines which templates and property overrides are used.

    Button

    Name

    What it does

    Move Upward Button

    Up Arrow

    Moves the selected item up one place in the list.

    Down Arrow Button

    Down Arrow

    Moves the selected item down one place in the list.

    DeleteButton screenshot

    Delete

    Deletes the currently selected item.

    Caution noteCaution
    Deleting an applied filter and clicking OK will remove all property override values and templates associated with the filter.

    To rename an applied device filter, select it, press F2, and then enter the new name.

    Hinweis

    Renaming applied device filters does not rename the definition in the Web.config file or in the code-behind file. You must manually update the filter names in those files.

  • Argument
    Provides an optional string value to pass to the device filter. If the filter selected in the Applied Device Filters list is an equality comparison filter, the string argument value is used instead of the argument defined in the Web.config file for the filter. If the filter selected in the Applied Device Filters list is an evaluator-delegate filter, the string argument value is passed to the evaluation method.

See Also

Reference

System.Web.UI.MobileControls.Form

System.Web.UI.MobileControls.Panel

System.Web.UI.MobileControls.DeviceSpecific

Device Filter Editor Dialog Box

Concepts

ASP.NET Device Filtering Overview

Overriding Properties

Other Resources

Developing Adapters for ASP.NET Server Controls

ASP.NET Web Sites for Mobile Devices

Using Device Filters

Customizing with Control Templates