Ribbon Group to stay same size as others fall to smaller

Ribbon for WPF Forum

Posted 8 years ago by Hamid Noorbakhsh
Version: 16.1.0631

I am using Ribbon and have several Groups in one Tab. As one reduces the width, they fall to the smaller 'Variant' size. I would like all groups to do what they are doing, except one that needs to remain still the same size. How can I acheive this? The Group contains 3 items (Button/SplitButton). I also want to have Button stay same size and the other twothat are ina Ribbon StackPanel to get one notch smaller.

I hope I am making sense. Everything works great/commands, etc. I am just in need of the resizing help.


See code below - Want the group to NEVER change size - SplitButton NEVER change size, but the two other buttons to get smaller, but show.


   <apribbon:Tab KeyTipAccessText="H" Label="HOME">
      <apribbon:Group ImageSourceSmall="/AMTB;component/Resources/Icons/run_16.png" Label="Task">
            <apribbon:GroupVariant Priority="1" Size="Large" />
         <apribbon:SplitButton Command="tbcommands:TBCommandManager.RunTask">
               <apribbon:Button Command="tbcommands:TBCommandManager.RunTask" Label="Run All" />
               <apribbon:Button Command="tbcommands:TBCommandManager.RunSelected" />
               <apribbon:Button Command="tbcommands:TBCommandManager.RunFromHere" />
               <apribbon:Button Command="tbcommands:TBCommandManager.StepThrough" />
          <apribbon:Separator />
          <apribbon:Button Command="tbcommands:TBCommandManager.StepThrough" />
          <apribbon:Button Command="tbcommands:TBCommandManager.StopExecution" />
and more code with Groups

Comments (2)

Answer - Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Hamid,

You can set the Group's IsCollapsible property to false to prevent it from collapsing at all.

The two buttons after the separator would need to be in a ribbon:StackPanel.  That should keep them large and side-by-side by default but then move them to being on top of each other when space is needed.  The StackPanel.ItemVariantBehavior property governs which variants are applied within the stack panel and when.

Actipro Software Support

Posted 8 years ago by Hamid Noorbakhsh

Worked great! Thank you, just did not look for the IsCollapsable. Once that was set, the rest was easy. I did use the StackPanel as suggested as it is EXACTLY what I wanted. Thanks again!

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

Add Comment

Please log in to a validated account to post comments.