dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.83k stars 1.67k forks source link

When border is added as Content the Desired Size Height is not updated properly when changing at runtime. #16064

Open AnanthaLakshmiKannan opened 12 months ago

AnanthaLakshmiKannan commented 12 months ago

Description

-Created a CollectionView with Border as Direct Content of DataTemplate. -Inside Border defined Grid with RowDefinitions as stat and Auto.Defined Label as FirstRow and Second row with VerticalStackLayout and changed is visibility at runtime through SelectionChanged event. -When Changing the visibility the Content Height is not updated in View.Eventhough updated as AutoSizing custom control. -With Border, The content measure is done, the Border content is returned with improper Desired Height value.

OutPut Image: image

Steps to Reproduce

1.Run the sample 2.Tap item to change the item visibility

Observed Behavior: Item visibility was changed but item not updated in view with updated Height. Expected Behavior: Item visibility must be changed and updated in view.

Link to public reproduction project repository

https://github.com/AnanthaLakshmiKannan/Issue-Border

Version with bug

7.0.86

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows

Affected platform versions

Android 13 - API 33

Did you find any workaround?

No response

Relevant log output

No response

ghost commented 12 months ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

mattleibow commented 12 months ago

Maybe related/duplicate: https://github.com/dotnet/maui/issues/15177

XamlTest commented 11 months ago

Verified this on Visual Studio Enterprise 17.7.0 Preview 6.0. Repro on Windows 11 and iOS 16.4 .NET 8, not repro on Android 13.0-API33 with below Project: Issue-Border.zip