fluentribbon / Fluent.Ribbon

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

Fluent:Button Size Middle not working anymore #1201

Closed GinoDerycke closed 1 month ago

GinoDerycke commented 2 months ago

Since update to 10.1.0, the Fluent:Button property Size="Middle" is not working anymore. It shows always as large. If I change by code the size to "Large" and then back to "Middle", it works.

Environment

batzen commented 2 months ago

Setting Size will only work temporarily if the control is placed in a RibbonGroupBox as it interferes with automatic sizing.

If you want to force a certain size you have to set SizeDefinition="Middle" (for example) or SizeDefinition="Middle,Small" if you only want to prevent your control from being large.

The reason for this is that during measures of RibbonGroupBox sizes of controls have to be adjusted and as there is no way to know for sure if Size was set because of automatic sizing or was set manually the size is simply overwritten.

It worked more often in versions prior to 10.1, but essentially it was a bug that got fixed in 10.1 by being more consistent when measuring/sizing.

GinoDerycke commented 1 month ago

Ok, thank you. This works!

Greetings,

Gino

Op wo 1 mei 2024 07:22 schreef Bastian Schmidt @.***>:

Setting Size will only work temporarily if the control is placed in a RibbonGroupBox as it interferes with automatic sizing.

If you want to force a certain size you have to set SizeDefinition="Middle" (for example) or SizeDefinition="Middle,Small" if you only want to prevent your control from being large.

The reason for this is that during measures of RibbonGroupBox sizes of controls have to be adjusted and as there is no way to know for sure if Size was set because of automatic sizing or was set manually the size is simply overwritten.

It worked more often in versions prior to 10.1, but essentially it was a bug that got fixed in 10.1 by being more consistent when measuring/sizing.

— Reply to this email directly, view it on GitHub https://github.com/fluentribbon/Fluent.Ribbon/issues/1201#issuecomment-2087994579, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMMMZFMIKSWGAR3PSOUWLLZAB3XXAVCNFSM6AAAAABG75S2OWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBXHE4TINJXHE . You are receiving this because you authored the thread.Message ID: @.***>