maui icon indicating copy to clipboard operation
maui copied to clipboard

Fixed Size not calculated properly when invoking UseMauiCompatibility method in MauiProgram

Open vishnumenon2684 opened this issue 1 year ago • 3 comments
trafficstars

Root Cause

When using UseMauiCompatibility, the ContentView handler is set to RenderToHandlerShim instead of ContentViewHandler. As a result, the measuring logic is managed by VisualElementRender, leading to a size of 0 being returned.

Description of Change

Registering the ContentView handler with the control as ContentView instead of IContentView will resolve the issue.

Validated the behaviour in the following platforms

  • [x] Android
  • [x] Windows
  • [ ] iOS
  • [ ] Mac

Issues Fixed

Fixes #10238

Output

Windows

Before Before

After After

vishnumenon2684 avatar Oct 24 '24 07:10 vishnumenon2684

Hey there @vishnumenon2684! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

/azp run

jsuarezruiz avatar Oct 24 '24 08:10 jsuarezruiz

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 24 '24 08:10 azure-pipelines[bot]

https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10446872&view=results https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10446873&view=results https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10446848&view=results

Failing device tests are unrelated

PureWeen avatar Oct 24 '24 18:10 PureWeen