Open BruceHaley opened 6 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Verified this issue with Visual Studio 17.11.0 Preview 1.0 (8.0.40 & 8.0.21& & 8.0.3). Can repro it.
I found a workaround for this problem: Add the property AutoSize="TextChanges"
to the Editor
control, as in:
<Editor
Text="{Binding Details}"
TextColor="LightGray"
FontAttributes="Bold"
AutoSize="TextChanges"
VerticalOptions="CenterAndExpand" />
With that change, there are no more sizing errors. Would be good if this were documented somewhere, like maybe here. Thanks.
Description
When a CollectionView has a HeightRequest property setting and its DataTemplate contains an Editor control, and when there are enough different-sized listed items to more than fill the page, displayed item sizes are randomly wrong.
I have created a repro in code using Microsoft's dotnet maui-samples.
Repro # 1:
Expected:
Listed items would all remain properly sized according to the amount of text in each.
Actual:
Some items are redisplayed the wrong size, leaving gaps at the bottom of the text. Each time you scroll, they come out sized differently, apparently randomly.
Repro # 2:
You can code your own repro from the dotnet maui-samples by pasting the following code snippet into the file ItemsUpdatingScrollModePage.xaml:
After pasting, follow the directions for Repro # 1.
Notes:
HeightRequest
andEditor
at the same time. See the code snippet. If you either delete theHeightRequest
line, or you changeEditor
toLabel
, the problem goes away.Link to public reproduction project repository
https://github.com/BruceHaley/maui-samples/tree/main
Version with bug
8.0.21 SR4.1
Is this a regression from previous behavior?
Unknown. Did not test other versions
Last version that worked well
Unknown
Affected platforms
Android, maybe others.
Affected platform versions
Android 12
Did you find any workaround?
No.