-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckBox
in MenuItem.Icon
doesn't display correctly
#367
Comments
It looks like the padding around the ContentPresenter for CheckBox is reserving space to the right of the check area which is messing with the scaling in the Viewbox of MenuItem's template (the Viewbox is why you can't change the size yourself). Probably best to use a special styling class to just hide the ContentPresenter in CheckBoxes used within MenuItem. Closing as by-design. |
Disabling the ContentPresenter doesn't seem to make any significant difference. I checked and the ones that are being displayed correctly are just part of the HeaderPresenter ie not the IconPresenter at all. |
Another slightly unrelated issue, but the shortcut in the screenshot |
You might be better off waiting until AvaloniaUI/Avalonia#11441 is ready which won't require a checkbox for toggle menu items.
This is probably because WPF menus (which Avalonia mimics) uses Grid.SharedSizeScope for menu items and the InputGesture text and the chevron are two different grid columns. This too, is by design. |
Describe the bug
If you use a CheckBox in a MenuItem.Icon, the resulting CheckBox will be too small and off-center.
MinWidth and MinHeight do not seem to have the desired changes; excluding them or changing their value doesn't solve the problem. Worked in Ava 10.
Screenshots:

Icon
CheckBox
shown in top-left, expected CheckBox size shown in bottom right.Desktop/Platform:
The text was updated successfully, but these errors were encountered: