This is a migrated thread and some comments may be shown as answers.

Completely hide ApplicationButton

1 Answer 77 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 01 Apr 2021, 11:54 AM

Hi!

I managed to hide the ApplicationButton of my RibbonBar by setting its visibility to hidden.

But the space where the button was is still visible, see attached screenshot 1, I would like have the first RibbonTab start at the very left, see screenshot 2.

Is this possible? If not, is it at least possible to set the color of the space where the button was to white?

Thanks a lot!

Screenshot 1:

 

Screenshot 2: It should look like this:

 

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 01 Apr 2021, 12:42 PM

Hello, Alexander,

Indeed the pictures are missing in your post but I suppose that you observe the space demonstrated below when ApplicationButton is hidden:

In order to avoid the empty space reserved for the ApplicationButtonElement you should access the StripViewItemContainer and set its Margin property as shown in the following code snippet:

StripViewItemContainer tabsContainer = this.radRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer;
tabsContainer.SetThemeValueOverride(RadElement.PaddingProperty, new Padding(0), "");

I hope this helps. Let me know if you have other questions.

Regards,
Nadya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
RibbonBar
Asked by
Alexander
Top achievements
Rank 1
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or