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.98k stars 1.71k forks source link

Android: Binding to Self Height property of element doesn't trigger layout. #19634

Open vladimirsamsonov opened 8 months ago

vladimirsamsonov commented 8 months ago

Description

When you bind the WidthRequest to the Height of an ellipse element, the update doesn't occur automatically. However, it can be resolved by manually triggering a layout update, such as adjusting the Margin of the parent element.

MauiApp2.zip

Steps to Reproduce

  1. Launch the attached project on an Android emulator or device.
  2. Initially, the ellipse occupies the entire area within the List ItemView.
  3. Upon pressing the "Click me" button, the ListView Margin is set, forcing a layout update.
  4. As a result, the ellipse transforms to the desired dimensions, forming a circular shape.

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

XamlTest commented 7 months ago

Verified this on Visual Studio Enterprise 17.9.0 Preview 4(8.0.3). Repro on Android 14.0-API34, not repro on Windows 11, iOS 17.2 and MacCatalyst with provided project. Android

BeepBeepBopBop commented 6 months ago

I have the same issue with a GraphicsView. Does anybody have a "clean" workaround to suggest ? Thanks for any help with this.