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

Stretch RibbonGroup to full width

3 Answers 180 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
corner4
Top achievements
Rank 1
corner4 asked on 19 Jul 2017, 03:27 PM

Dear Telerik-Team,

 

I am working on the migration from standard Microsoft controls to Telerik WPF UI 2017/2 suite for our software products.

 

Is there any way to stretch the RadRibbonGroup from the left to the right of the window (please see attached file)?

 

 

Best regards,

Markus

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 24 Jul 2017, 07:57 AM
Hello Markus,

As I understand you want to stretch the last group in the ribbon tab so that it takes all the available space in the ribbon' content. Please correct me if I am wrong. Currently, this behavior is not supported by RadRibbonView, but you can implement with some custom code. Basically, you can write a custom panel that derives from RibbonGroupPanel and override its ArrangeOverride() method. There you can re-arrange the groups. The custom panel can be assigned to the ItemsPanel property of RadRibbonTab.

You can find this approach demonstrated in the attached project.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
corner4
Top achievements
Rank 1
answered on 11 Sep 2017, 11:54 AM

Hello Martin,

 

thanks for your example - you understood my question, and the solution is nearly perfect.

 

When I am resizing the main window, the last group in ribbon tab is always fitting itself into its ribbon tab - it works great. But when I click on the "Maximize" Button, the resizing does not work. I tried some workarounds but nothing helped.

 

So do you know a solution for my Problem?

 

Thanks in advance,

Markus

0
Martin Ivanov
Telerik team
answered on 14 Sep 2017, 09:56 AM
Hello Markus,

It seems that the ribbon size is updated after the arrange pass of the custom panel, so the calculations are wrong in some cases. In order to resolve this you can alter the solution a bit. You can check this modification in the attached project. I hope it helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
RibbonView and RibbonWindow
Asked by
corner4
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
corner4
Top achievements
Rank 1
Share this question
or