Canvas Apps Performance

Icons – How to increase performance!

Power Apps icons
Power Apps icons

Introduction

One of the goals of any maker is to improve the performance of their apps. You can do several things to achieve that goal. One of those is to reduce the number of controls on a screen(for more considerations, click here). In other words, reuse as many controls as possible. Usage of galleries is pretty common. That being said, one of the downsides of a gallery is that it doesn't have headers. If you want headers, you need to add buttons or labels outside the gallery. It is very common to provide sort capabilities for each column header in ascending or descending other or both.

Tip - Control reusability for performance

In a use case as defined above, you would typically use a down arrow icon and a up arrow icon for each header. For a given header, you would control the visibility of the down and up arrows based on whether the sort order is ascending or descending. Then, you would control the visibility of whether you want to show the down (or up) arrow of the first header, or second or any other header based on which column is currently being used to sort the gallery.

Now imagine if your gallery has 5 headers. That would mean, 2 icons for each header and 10 icons total. To reduce the total count from 10 to 2, one thing you can do is to have just 2 icons - one down arrow and one up arrow and then control the X position of those icons based on which column is being currently used to sort the gallery.

The next step to reduce the number of icons from 2 to 1 is to use the Rotation property. Based on whether the current sort order is ascending or descending, you can set the Rotation property to Rotate180 to change the down arrow to up, or vice versa.

Stay tuned for the remaining 17 tips!

Recent articles

  1. A-Z: 26 tips! Learn how to improve your Power Apps!
  2. Add Picture vs Camera Control – Who is the winner?
  3. Background images for Power Apps screens – the right way!
  4. Combo box or Dropdown? - Who is the winner?
  5. Delegation in Power Apps – How to identify and test!
  6. Edit vs Display – Which is the better form?
  7. Formulas – How to learn the 170+ Power Apps formulas?
  8. Galleries vs Data Tables – How to pick between the two in Power Apps?
  9. Hyperlinks – How to launch web pages & apps in Power Apps!