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

how to align Menu and SubMenus dynamically

Hi 

Is there any experts on how to align components(menu, SubMenus Bars) dynamically..?

currentmenu.PNG

Home,Products,Ebikes,  And Home-SubMenu1, etc.. is component menu bar

When onselect on Home submenus should display very close Home and these Products, Ebike should display after SubMenus

like below 

expectingmenu.png

Appreciate if you could do the needful.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: how to align Menu and SubMenus dynamically

Hi @kmk 

 

Oh, something weird happened.

Please find the attachment.

View solution in original post

Highlighted
Community Support
Community Support

Re: how to align Menu and SubMenus dynamically

Hi @PowerAddict ,

Yes, That's my oversight. Thanks for reminding. Flexible height gallery is the key to Expander Menu.

 

Hi @kmk ,

If you want to Add Icon for subMenu, in the component edit phase, you should add an Icon Field in Sub nested table in MenuItems, and Add an Icon control inside the SubMenuGallery, then Set the Icon1.Icon property to ThisItem.Icon.

Snipaste_2020-04-15_09-25-44.png

Hope this helps.

Sik

 

View solution in original post

14 REPLIES 14
Highlighted
Super User
Super User

Re: how to align Menu and SubMenus dynamically

If these are 2 different components, it really depends on how these were created, if these customization options are available or not etc. You can probably make them flexible/customizable. However, it is pretty easy to recreate this menu without using components and will give you complete control over how you want it to work. 

 

Let me know the answers to these questions and we can figure this out. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Highlighted
Community Support
Community Support

Re: how to align Menu and SubMenus dynamically

Hi @kmk ,

 

How did you define the component? We need more details about your components to provide further assistance.

However, I have a Sample Expander Menu that should satisfy your requirements. I made some modifications to fit your case, please find the attachment and have a try:

If you want to change the menu values, only need to redefine the Items property of Gallery1, The Main field store the Level1 menu values and the Sub field store a table containing Level2 menu value.

GIF_54.gifSnipaste_2020-04-10_11-28-02.png

Hope his helps

Sik

 

Highlighted
Helper V
Helper V

Re: how to align Menu and SubMenus dynamically

Hi @v-siky-msft ,

 

Really thanks for your efforts to spend some time on this issueor POC.

Q: How did you define the component? We need more details about your components to provide further assistance.

i just followed this video to create menu https://www.youtube.com/watch?v=3J8cH0qGpow

on top of that i have created another gallery for submenu, means one component with two gallery(1 for Menu, 2 for Submenu)

coming to your sample POC is 

Just want to know 

1. what is the use of keeping gallery under another gallery as per the functionality, if we keep gallery under gallery can we perform any special or additional functionalities to perform SubMenus items..?

2.what is the steps to be needed here between menu and submenu gallery ..?

 

Really happy if you do a video on this with steps on this POC like.

let me know if you want me to share component file as well.

 

Highlighted
Helper V
Helper V

Re: how to align Menu and SubMenus dynamically

Hi @PowerAddict 

i just followed a video on this. https://www.youtube.com/watch?v=3J8cH0qGpow

its one component with two galleries.

yes please.

Highlighted
Helper V
Helper V

Re: how to align Menu and SubMenus dynamically

Hi @v-siky-msft 

i just opened the it working fine, 

but same way i just created a new app but some how went wrong like when we click on collapse Icon below menu has to come close to Home menu but no luck followed the height property for SubMenu. but still some thing i missed to move up when below menu items when click on Collapse icon.

 

expand.PNGcollapse.PNG

By any chance can you see here.

 

Highlighted
Super User
Super User

Re: how to align Menu and SubMenus dynamically

Hi @kmk , 

 

I took the solution posted by @v-siky-msft and expanded it further to allow icons outside the gallery, but still move according to the menu item selected. 

 

I have attached the app. This is how it behaves: 

ExpandableMenu.gif

 

Let me know if this works. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Highlighted
Community Support
Community Support

Re: how to align Menu and SubMenus dynamically

Hi @kmk ,

 

The sub-gallery is added inside the main-gallery, and the sub-menu is defined as the nested table in the Menu Item property.

The Sub-Gallery Items property is defined as ThisItem.Sub, and OnSelect property is Navigate(ThisItem.Screen), then when you click the corresponding sub-menu, it will navigate to specifics screen.

I have re-created an out-of-the-box component by the Expand Gallery I provided. Please find the attachment, and import component, you only need to define the Menu Items property as  below:

Snipaste_2020-04-13_10-49-37.png

Sik

Highlighted
Helper V
Helper V

Re: how to align Menu and SubMenus dynamically

Hi @PowerAddict 

Yes, 100% this solution work to me. i really happy for your support.

Sorry for delay, actually, i am at remote area, so limited network.

but @PowerAddict  and @v-siky-msft  really thanks for your efforts.

Highlighted
Helper V
Helper V

Re: how to align Menu and SubMenus dynamically

Hi @v-siky-msft 

"I have re-created an out-of-the-box component by the Expand Gallery I provided. Please find the attachment, and import component,"

 

can`t see any attachment for recreated using Powerapps OOB component.

request you kindly share the Attachment.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (5,429)