Scrollbar for Buttons in SplitButton Menu

Ribbon for WPF Forum

Posted 8 years ago by Sebastian Limke
Version: 11.1.0542
Avatar
Hi,

im using a split button to show different kind of menus in my ribbongroup.
Is it possible to get a vertical scrollbar for the buttons in the menu? I need this because i have limited the height of the menu to 50. Thats because i only want to show the first 2 or 3 items at the beginning and i want the rest of the menuitems (buttons) to be scrollable!

here is some easy sample code:

<ribbon:SplitButton Name="splitti" Label="Split-Button">
<ribbon:Menu Height="50">
<ScrollViewer>
<StackPanel>
<ribbon:Button Label="Paste" KeyTipAccessText="P" />
<ribbon:Button Label="Paste Special" KeyTipAccessText="S" />
<ribbon:Button Label="Paste Hyperlink" KeyTipAccessText="H" />
<ribbon:Button Label="Paste" KeyTipAccessText="P" />
<ribbon:Button Label="Paste Special" KeyTipAccessText="S" />
<ribbon:Button Label="Paste Hyperlink" KeyTipAccessText="H" />
<ribbon:Button Label="Paste" KeyTipAccessText="P" />
<ribbon:Button Label="Paste Special" KeyTipAccessText="S" />
<ribbon:Button Label="Paste Hyperlink" KeyTipAccessText="H" />
<ribbon:Button Label="Paste" KeyTipAccessText="P" />
<ribbon:Button Label="Paste Special" KeyTipAccessText="S" />
<ribbon:Button Label="Paste Hyperlink" KeyTipAccessText="H" />
<ribbon:Button Label="Paste" KeyTipAccessText="P" />
<ribbon:Button Label="Paste Special" KeyTipAccessText="S" />
<ribbon:Button Label="Paste Hyperlink" KeyTipAccessText="H" />
</StackPanel>
</ScrollViewer>
</ribbon:Menu>
</ribbon:SplitButton>

what happens now is that the first buttons are shown as well as the scrollbar but the scrollbar is disabled.

any idea? am i mixing something up?

Thx from Germany
SLimke

Comments (2)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Sebastian,

Maybe if you flip things around so you do this instead:
<ScrollViewer Height="50"> 
<ribbon:Menu>
...
</ribbon:Menu> 
</ScrollViewer>


Actipro Software Support

Posted 8 years ago by Sebastian Limke
Avatar
oh damn its that easy!
My fault :)
Thx very much!
The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.