Closed mikernet closed 2 weeks ago
Thanks for the report.
I'm not seeing the behavior you're reporting: https://playground.platform.uno/#8e26c2fc
Can you create a larger repro case or playground link for your issue?
I'm trying to copy all my styles over to narrow it down but getting errors like "Implicit content is not supported on SolidColorBrush" and "Implicit content is not supported on Thickness" for some odd reason:
Okay, I think I found the problem: https://playground.platform.uno/#78d184a5
It looks like the combox uses the implicit textblock style margin to do some layout calculations, causing the issues inside the combobox. This does not happen on UWP. Interestingly, it seems to ONLY be the margin that affects the combobox.
Actually that's not true - the font size makes it do weird layout stuff when it first loads as well: https://playground.platform.uno/#e67ba490
Notice how it is the wrong size on initial layout and fixes itself after an item is selected.
It may be noteworthy to add that making a copy of the default UWP combobox template and using that does not fix the issue.
I found a workaround for now: add an empty TextBlock
style into the ComboBox
resources, i.e:
<ComboBox>
<ComboBox.Resources>
<Style TargetType="TextBlock"/>
</ComboBox.Resources>
</ComboBox>
Note this also affects the checkmark layout in checkboxes: https://playground.platform.uno/#7538a1cc
Current behavior
Implicit text block styles in scope of some controls mess up layout calculations. For example, this is what comboboxes look like on
Uno.IU
platforms (iOS, WASM) when a textblock style with a large top margin is present:Checkbox checkmarks are also offset:
Expected behavior
Looks like this on UWP:
How to reproduce it (as minimally and precisely as possible)
http://playground.platform.uno/#8edc1bb5
Workaround
Environment
Nuget Package:
Nuget Package Version(s): v3.6.0-dev.378, v3.8.6, v3.9.0-dev.54
Affected platform(s):
IDE:
Relevant plugins:
Anything else we need to know?