maui
maui copied to clipboard
Fixed Size not calculated properly when invoking UseMauiCompatibility method in MauiProgram
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
After
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
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
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