fluentribbon / Fluent.Ribbon

WPF Ribbon control like in Office
http://fluentribbon.github.io
MIT License
2.48k stars 515 forks source link

InRibbonGallery Reduce not persisted. #1159

Closed SebiCiuca closed 10 months ago

SebiCiuca commented 10 months ago

Place your issue description here.

InRibbonGallery reduce is not persisted when tabs moving. I am trying to the the InRibbonGallery to behave like a "DropDownButton", because I need the GroupBy functionality. I set MaxItemsInRow="1" and MinItemsInRow="1" and CanCollapseToButton="true" at design time. This still shows the Gallery with "one row of items". So at runtime when my View is activated I call Gallery.Reduce(). This make the Gallery display as a DropDownButton and works as expected, but as soon as you switch tabs, the InRibbonGallery shows again as a one row.

It would be extra nice if we can define the InRibbonGallery as "IsButton" at design time that mimic the Reduce() where Min>Max.

Please do not include large amounts of code in your issue. Please attach a zip file containing a repro instead.

This can be reproduce with the Showcase app if you got "Insert" tab click on Reduce button (until the Split InRibbonGallery shows as a button), move to any other tab and go back to Insert tab (now InRibbonGallery shows 2 rows (design time properties).


Environment

batzen commented 10 months ago

That's by design as manually calling Reduce will be overwritten as soon as the layout is re-calculated.

If you don't want your gallery to scale automatically you can do one of the following:

SebiCiuca commented 10 months ago

"CanCollapseToButton=False and IsCollapsed=True " worked... not sure how I missed this combination. Thank you!