Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save m3ngi3/f628ca1f4dccdae1f8f9f79edd1080e8 to your computer and use it in GitHub Desktop.
Save m3ngi3/f628ca1f4dccdae1f8f9f79edd1080e8 to your computer and use it in GitHub Desktop.
PowerApps Gallery as Navigation - Formula for TemplateSize
Parent.Width / If(
CountRows(GalleryRibbon_Splash.AllItems)<=GalleryRibbon_Splash.BorderThickness,
CountRows(GalleryRibbon_Splash.AllItems),
If(
Or((((CountRows(GalleryRibbon_Splash.AllItems)/GalleryRibbon_Splash.BorderThickness)-(RoundDown(CountRows(GalleryRibbon_Splash.AllItems)/GalleryRibbon_Splash.BorderThickness,0)))*GalleryRibbon_Splash.BorderThickness)>(0.5*GalleryRibbon_Splash.BorderThickness),((CountRows(GalleryRibbon_Splash.AllItems)/GalleryRibbon_Splash.BorderThickness)-(RoundDown(CountRows(GalleryRibbon_Splash.AllItems)/GalleryRibbon_Splash.BorderThickness,0)))=0),
GalleryRibbon_Splash.BorderThickness,
RoundUp(GalleryRibbon_Splash.BorderThickness*0.5+0.001,0)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment