Mode

Provides access to methods to get the information about the current state of the code component.

Available for

Model-driven and canvas apps.

Properties

allocatedHeight

Height in pixels allocated to the component.

Type: number

allocatedWidth

Width in pixels allocated to the component. This property is supported in both model-driven and canvas apps.

Type: number

isControlDisabled

Whether the component is disabled. This property is supported in both model-driven and canvas apps.

Type: string

isVisible

Whether the component is visible on the page. This property is supported in both model-driven and canvas apps.

Type: boolean

label

The defined component label. This property is supported in both model-driven and canvas apps.

Type: string

Methods

Method Description
setControlState Set component state so that it will be stored in one session. However, when application is in multisession experience then the same state is shared across all tabs.
setFullScreen Make the component full screen.
trackContainerResize Determines the container sizing if the component needs to react. Component will get allocatedWidth or allocatedHeight if the input is true.

Power Apps component framework API reference
Power Apps component framework overview