Ribbon Buttons

Ribbon for WPF Forum

Posted 15 years ago by Michael Smit
Version: 4.5.0485
Hi all,

I have a ribbon bar with 4 tabs and multiple groups/buttons in each tab.

I am hiding/showing groups/buttons based on the logged in users access rights. It works fine, but the ribbon bar looks UGLY when hiding groups or buttons. The items left visible, don't dock and take up the space of the hidden items.

Am I missing something? How do I remove empty space for items that have been hidden?


Comments (4)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Michael,

Hmm... I think the problem could be that we designed things according to the Microsoft specifications where you aren't supposed to be toggling control visibility within a tab.

However if you can email over a simple project that shows the problem to our support address we'd be happy to take a look and see what we can do to help.

For a temporary workaround you may wish to create various Tab objects for each access type. Then swap in and out the appropriate ones based on access level.

Actipro Software Support

Posted 15 years ago by Michael Smit
Actually easy for them to create the project themselves.

Add ribbon bar.
Add Tab.
Add Group.
Add 2 buttons in group.
Set visibility of first button to Hidden. Second button should automatically move up to the left, and the group resize to not leave a blank space where button 2 was.
Currently, button 1 will hide, and there is a "hole" left where it was. We basically need some sort of docking and resizing behavior in the ribbon control.
Posted 15 years ago by Anurodh Ora

Try with setting up Button/Group visibility to Collapsed instead of Hidden.

Hope this help you.
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA

What Anurodh said is correct. Visibility.Hidden means take up the same space as Visibility.Visible but just don't show anything there, thus you see a gap. Visibility.Collapsed truly hides the element and measures it as 0,0. See if that helps.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.