maui
maui copied to clipboard
Process ContainerView through mapper and fix NeedsContainer logic
Description of Change
- When a container needs to be added we should update it via the
Mapperso that participating views can intercept via theMapper- These changes are related to https://github.com/dotnet/maui/pull/12259. I need a way from
Controlsto trigger an update with the container changes.
- These changes are related to https://github.com/dotnet/maui/pull/12259. I need a way from
- The
NeedsContainercalculation on WinUI seems to be incorrect and was left out of theClipandShadowupdates. TheViewHandleralways adds a container for all platforms ifClipandShadoware set butNeedsContainerwasn't taking those properties into account. This was actually causingRemoveContainerto get called if you setClipand didn't setShadowbut sinceRemoveContainerwas called during initial setup theContainerViewwould incorrectly remain in place even thoughHasContainerwould transition tofalse. You'll see in the tests here forContainerViewtesting I added a check forHasContainerbecause that value is currently false on Windows without the change in thisPRfor theContainerViewtests.- This also could lead to scenarios in windows where if you were to remove a shadow but leave the clip the container would disappear.