cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sperry1625
Helper V
Helper V

Gallery Control Alignment Problem

I am having a strange issue.  I have an app with two Galleries on a Screen.  The first gallery is a list of buildings.  The second gallery is a list of Events for the selected building. When developing and testing the application in the Studio, everything is great.  See first screenshot:

sperry1625_0-1632750942129.png

Alignments are good, all data is visible.  When I Save and Publish the app and run it, I get the below:

sperry1625_2-1632751995543.png

 

The alignment on everything is off. On the right Gallery, the background rectangle is the proper size (Is shades the background for h the selected row). The Separator Bar has a fixed X/Y value of 0/0, yet it is overlapping the row above.  If I change the Zoom in my browser (Edge) to 250% the screen looks good. Withing the Gallery template the controls are aligned by formula to each other, although that should not matter.

 

Does anyone have any idea why this is happening and how to fix it?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

All of the controls, except for an anchor control, use formulas to calculate position to one another.  I solved this with two changes.  The first was to set the Display property to Maintain aspect ratio. The second was to move the separator bar to the bottom of the template instead of the top. Although I believe the separator had little to do with the fix, it helped/  The real fix was the Aspect Ratio.  Galleries apparently do not work well if that is not on. Screws up all control and template sizing and alignments.

 

sperry1625_0-1633276756734.png

 

View solution in original post

4 REPLIES 4
C-Papa
Super User
Super User

are you using a formula to calculate the gallery item height?

The Gallery TemplateSize is fixed at 100.

C-Papa
Super User
Super User

its difficult to tell without review the code in depth but it looks like the contents of the gallery has a combined height greater that your template height. It looks like the Y position of some of you elements are calculated wrong? try increase the template height to something much larger. Also, is this a flexible Gallery? if it is the it is definitely to do with the element Y value calculations. For example, your separator bar should be below you comment box / input but its not, check the Y value of this.  

All of the controls, except for an anchor control, use formulas to calculate position to one another.  I solved this with two changes.  The first was to set the Display property to Maintain aspect ratio. The second was to move the separator bar to the bottom of the template instead of the top. Although I believe the separator had little to do with the fix, it helped/  The real fix was the Aspect Ratio.  Galleries apparently do not work well if that is not on. Screws up all control and template sizing and alignments.

 

sperry1625_0-1633276756734.png

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,408)