Force 3 BarCheckBox Into 3 Rows

Bars for WPF Forum

The latest build of this product (v26.1.0) was released 1 month ago, which was before this thread was created.
Posted 5 days ago by Miles Merckel
Version: 26.1.0
Avatar

Hi

I have 3 BarCheckBoxes placed on a RibbonTabItem within a RibbonGroup. I want them displayed on 3 rows so should be in a single column when Classic Ribbon Layout selected.

Tried using the RibbonMultiRowControlGroup but unable to meet my simple requirement.

I struggle with the documentation, trying to understand the layout modes, density, resizing and variants. The description may have a brief code snippet but no clear explicit before and after examples, as if it's written by and for someone that knows it thoroughly already. The demo's view source code, when not crashing, obscures code with templates hidden in another file rather than clearly demonstrate a feature.

Thanks

Comments (1)

Answer - Posted 4 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Miles,

We apologize about the v26.1.0 Sample Browser having an issue for customers who licensed some controls not being able to use the app when they encounter an unlicensed control.  This problem was identified right after release and v26.1.1 betas currently on nuget.org fix it if you update the references to use one of those prerelease versions.

For your scenario, you'd want to use a RibbonControlGroup control with ItemVariantBehavior="AlwaysMedium".  Then put your three BarCheckBox controls directly inside that.  RibbonControlGroup is the grouping control that will normally try and stack vertically and then flip to horizontal as needed and if allowed.

RibbonGroup
- RibbonControlGroup ItemVariantBehavior="AlwaysMedium"
  - BarCheckBox 1
  - BarCheckBox 2
  - BarCheckBox 3

RibbonMultiRowControlGroup on the other hand displays contained controls in snaking horizontal layout in two or three rows within the parent ribbon group.  That control is similar to the Font and Paragraph ribbon groups in Word, which is not really what you want here.  You want RibbonControlGroup instead.

I hope that helps!


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.