fluentribbon / Fluent.Ribbon

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

GroupName causes the selected ToggleButton to no longer trigger the click event #1196

Closed tp1415926535 closed 2 months ago

tp1415926535 commented 2 months ago

I'm working on a drawing board tool that requires single selection menus and supports repeat selection tools. But I realized that after set GroupName to Fluent:ToggleButton, both Click and Command no longer trigger when it checked .


Environment

batzen commented 2 months ago

That's by design as it would cause no button in the group to be selected anymore see #481. It exactly the same behavior you get from a RadioButton. The real issue here is that the base ToggleButton class has an OnToggle which can't be overridden because it's protected internal.

batzen commented 2 months ago

Ah. I could just manually raise the event and call the command.