Skip to main content

How to Add a Container Control in Power Apps

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

A Container keeps related controls together, with its own size, fill and border, and lets you place each control inside it wherever you want. In a responsive screen built from vertical and horizontal containers, it's also the place for controls those layout containers don't support, such as charts.

How It Works​

From Microsoft's Container reference:

  • It holds a set of controls and has its own properties: BorderColor, BorderStyle, BorderThickness, Fill, Height, Width, Visible, X and Y.
  • The controls inside are placed with X and Y from the container's top-left corner. Inside it, Parent is the container, so formulas such as Parent.Width follow its size (Create responsive layouts).
  • It has limits. It can't hold a Data table, a PDF viewer or a Web barcode scanner, and containers don't work within forms.
  • It isn't a group. A group only helps you select several controls while editing. A container is a control: it affects the layout, and helps screen reader users understand the app's structure.

Vertical container and Horizontal container are layout containers: they place their controls themselves. Microsoft's responsive apps guide lists a known issue: the Data table, Charts, and Add Picture controls are currently not supported in the layout containers. A plain Container isn't a layout container, so it can sit in the layout and hold a chart.

The example is the Reports screen of the Overtime Timesheet app, a responsive screen built from vertical containers, with a column chart of each department's approved overtime.

Step 1: Insert a Container​

Select the control that should hold the new container, here the screen's scrolling vertical container, conBodyRS. Open Insert and search for Container. Under Layout, it lists Container, Horizontal container, Vertical container and Grid container:

The Insert pane searched for Container, with Container, Horizontal container, Vertical container and Grid container under Layout

Select Container. It goes into the selected vertical container. I renamed it conChartRS (How to Rename a Screen or Control in Power Apps).

Step 2: Give It a Size​

Inside a vertical container, the layout places the container, and these settings decide its size:

PropertyValueWhy
WidthMin(640, Parent.Width - 48)The same width as the screen's other controls, narrower on phones
Align in containerStartKeeps that width instead of stretching
Flexible heightOff (FillPortions 0)Below
Height360Room for the chart's title, chart and legend
Drop shadowNone

The formula bar with the Width property set to Min(640, Parent.Width - 48)

The new container started with Flexible height on, and it ignored its Height until I turned that off. In the formula bar, Flexible height off is FillPortions 0:

The formula bar with the FillPortions property set to 0

The formula bar with the Height property set to 360

Step 3: Put Controls Inside​

Insert the controls with the container selected, or cut them in the tree view and paste them onto the container (How to Copy and Paste Controls Between Screens in Power Apps). Then place each one from the container's size. Here, the chart's title, the chart and its legend:

ControlXYWidthHeight
lblChartTitleRS00Parent.Width32
chtDepartmentsRS040Parent.WidthParent.Height - 80
lgdDepartmentsRS0Parent.Height - 40Parent.Width40

The tree view shows the three controls inside conChartRS:

The Tree view of Reports Screen with conChartRS inside conBodyRS, holding lgdDepartmentsRS, chtDepartmentsRS and lblChartTitleRS, between lblMessageRS and lblDepartmentTotalsRS

The Result​

On a phone 390 pixels wide, the container took the narrower width, and the chart inside it followed:

The Reports screen at phone width: Back, Reports and a refresh icon in the header, November 2026, Showing: All departments, Approved hours in November 2026: 20.25 on two lines, 6 entries from 4 people, the chart and its legend, the department totals, and four person cards

Common Mistakes​

MistakeWhat happensDo this instead
A chart straight in a vertical or horizontal containerMicrosoft lists charts as not supported in layout containersA plain Container around it
Flexible height left onThe container ignores its HeightTurn it off: FillPortions 0
Fixed numbers for the controls insideThey don't follow the container's sizeFormulas from Parent.Width and Parent.Height
A Data table in a containerThe reference lists it as not supportedPut it outside containers

Troubleshooting​

SymptomLikely causeFix
The container is taller or shorter than its HeightFlexible height is onTurn it off
A control you pasted isn't in the containerIt was pasted with something else selectedCut it and paste it onto the container in the tree view
The container doesn't showIts Visible is false, or it's empty with no fill or borderCheck Visible; give it a control or a fill

FAQ​

Container or group?​

Microsoft's reference answers it: a group is an aid while editing, with no properties of its own. A container is a control with its own properties that affects the layout, and it should hold controls that belong together.

Can a container hold other containers?​

Yes. The vertical and horizontal containers on this screen hold each other, and the plain container sits inside one of them.

Do controls inside a plain container move with the layout?​

The container moves with the layout. The controls inside it keep their X and Y from its top-left corner, so they move with it.

Conclusion​

Insert a Container from Insert > Layout, size it like the other controls on the screen, and place the controls inside it with formulas from Parent.Width and Parent.Height. In a responsive screen, it's the way to include a chart, which layout containers don't support.

Additional Resources​