Tab positioning in RadRibbonBar (Positionnement de l'onglet dans la RadRibbonBar)

1 Answer 22 Views
RibbonBar
Laurent
Top achievements
Rank 1
Iron
Laurent asked on 03 Dec 2024, 04:47 PM

Hello,

RadRibbonBar avec le thème Fluent (RadRibbonBar with Fluent theme)

En ajoutant la commande pour faire disparaitre le menu, l'onglet se positionne au début.

(By adding the command to make the menu disappear, the tab is positioned at the beginning.)

CAST(THIS-OBJECT:RadRibbonBar:GetChildAt(0):GetChildAt(5), Telerik.WinControls.UI.RadApplicationMenuButtonElement):Visibility = Telerik.WinControls.ElementVisibility:Hidden.

Si je change de thème  (Desert) l'onglet se positionne pas au début (comme sur le thème Fluent).

(If I change the theme (Desert), the tab is not positioned at the beginning (as on the Fluent theme).)

Best regards

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 06 Dec 2024, 10:53 AM

Hello, Laurent,

Thank you for writing. 

It seems that you would like to eliminate the space that occurs when the ApplicationButtonElement is hidden. I would recomend to set the ElementVisibility.Collapsed instead of Hidden, and also apply a padding to the items container. You can use the following code snippet, for example in the form's Load():

protected override void OnLoad(EventArgs e)
{
   base.OnLoad(e);
   this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Visibility = ElementVisibility.Collapsed;
   this.radRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer.Padding = new Padding(0,0,0,0);
}

Here is the result when using the Desert theme: 

I hope this helps. If you have any other questions do not hesitate to contact me.

Regards,
Nadya | Tech Support Engineer
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
Laurent
Top achievements
Rank 1
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or