Using RibbonControlServcie.Label with a ComboBox in the Ribbon

Ribbon for WPF Forum

Posted 8 years ago by Eric P
Version: 16.1.0633

So I am trying to add controls like TextBox, ComboBox, and a DateTime control to the Ribbon. I started using the controls in the editor namespace and this is what I have so far.

<ribbon:Group Label="Notes>
    <editors:TextBox Width="150" ribbon:RibbonControlServcie.Label="Name" />
    <ribbon:ComboBox Width="150" ribbon:RibbonControlServcie.Label="Folder" />

I can see the Name label next to the TextBox in the Ribbon but I do not see the Folder lable next to the ComboBox. I realize that this is becasue the RibbonControlServcie.Label only works on controls in the editors namespace, correct? The ComboBox needs to display a list of strings so what are my options for getting the label next to the ComboBox like the other controls? I realize I can just add a normal TextBlock to the left of the CombBox to achieve this but I wanted to make sure there was not an Actipro control that would do the same. Why is there not a ComboBox or something like a StringsEditBox control in the editors namespace?



Comments (1)

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

Hi Eric,

The RibbonControlService.Label should work with any control.  In your scenario, I think it's probably due to variants.  Try setting ItemVariantBehavior="AlwaysMedium" on your StackPanel.  That gets both showing in my case.

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.