Replies: 2 comments 6 replies
-
The FluentTheme Avalonia/src/Avalonia.Themes.Fluent/Controls/CheckBox.xaml Lines 28 to 69 in 808c86f There are a fair number of fixed sizes which aren't easy to work around. It's easier to either: 1. re-template or 2. put it in a Viewbox or 3. apply a |
Beta Was this translation helpful? Give feedback.
-
Note that this behavior is intentional with the Fluent theme and matches upstream WinUI. You can still see the discussions for it some place. The CheckBox is top aligned with a margin for multi-line text. When you have a whole sentence that spans multiple lines you want the CheckBox to ONLY appear at the first line. This is why it has hard-coded margins too (it assumes a certain font/size of text). All of this said, WinUI may not have made the most general-purpose decision here. It certainly causes issues on different platforms as well (FluentAvalonia has special settings for this case). So we can:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to vertically align the square/tick box of a CheckBox whose heights exceed 60+ px (big sizes), however it doesnt seem to be that trivial for some reason. The Context is automatically aligned, but the quare box fails. Here's the code:
Here's the result:

I'm using Avalonia 11.2.8 and FluentTheme. There arent any Styles or whatsoever, just a plain Avalonia application with the CheckBox above.
Beta Was this translation helpful? Give feedback.
All reactions