Using RibbonControlServcie.Label with a ComboBox in the Ribbon

Ribbon for WPF Forum

Posted 6 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 6 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 (v22.1.3) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.