Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Indicates which feature the code components want to use.
Available for
Model-driven apps
Parameters
Element | Description | Type | Required |
---|---|---|---|
name |
Name of the feature that is declared in the component | string |
Yes |
required |
Indicates if the component requires that feature or not | boolean |
Yes |
Parent Element
Element | Description |
---|---|
feature-usage | The feature-usage element acts as a wrapper around the uses-feature elements, which themselves allow developers to declare which features their component wants to use. If there are no uses-feature elements defined, the feature-usage element is not required. |
Example
<feature-usage>
<uses-feature name="WebAPI" required="true" />
</feature-usage>
The following table shows the relationship of these settings to what happens in the code at runtime whether the feature function is available to call based upon the uses-feature
settings defined in the manifest.
Manifest | If Host supports | If Host doesn't support |
---|---|---|
uses-feature name="device.captureImage" required="true" |
Context.device.captureImage != null , no check needed. |
Warning at design time. Component load fails at runtime. |
uses-feature name="device.captureImage" required="false" |
Context.device.captureImage != null |
Context.device.captureImage == null , component can adaptively check this at runtime. |
(none) | Context.device.captureImage == null |
Context.device.captureImage == null |
Related articles
Power Apps component framework manifest schema reference
Power Apps component framework API reference
Power Apps component framework overview