Stretch RibbonGroup to full width

4 posts, 0 answers
  1. corner4
    corner4 avatar
    2 posts
    Member since:
    Nov 2015

    Posted 19 Jul Link to this post

    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

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1404 posts

    Posted 24 Jul Link to this post

    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.
  3. corner4
    corner4 avatar
    2 posts
    Member since:
    Nov 2015

    Posted 11 Sep in reply to Martin Ivanov Link to this post

    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

  4. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1404 posts

    Posted 14 Sep Link to this post

    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.
Back to Top