cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kmk
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
v-siky-msft
Community Support
Community Support

Hi @kmk 

 

Oh, something weird happened.

Please find the attachment.

View solution in original post

v-siky-msft
Community Support
Community Support

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
PowerAddict
Super User II
Super User II

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

v-siky-msft
Community Support
Community Support

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

 

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.

 

Hi @PowerAddict 

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

its one component with two galleries.

yes please.

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.

 

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

v-siky-msft
Community Support
Community Support

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

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.

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (39,554)