Bug 55942 - IsClippedToBounds Not Working On Android When Children Are Dynamically Resized
Summary: IsClippedToBounds Not Working On Android When Children Are Dynamically Resized
Status: RESOLVED DUPLICATE of bug 54425
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
Depends on:
Reported: 2017-05-04 02:50 UTC by Hakan
Modified: 2017-06-23 18:24 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Hakan 2017-05-04 02:50:46 UTC
IsClippedToBounds is not working on Android when children of the element are resized. You can try it by simply putting an image inside an AbsoluteLayout and enlarging the image on OnSizeAllocated override of the page.

I tried wrapping the AbsoluteLayout in a ContentView and it did not work.

The only thing that worked was after wrapping the AbsoluteLayout inside a ContentView, adding the following in the ContentView's custom renderer:

        public override void Draw(Canvas canvas)
            if (Element.IsClippedToBounds)

Trying the same for AbsoluteLayout did not work.

IsClippedToBounds works fine on iOS.
Comment 1 Hakan 2017-05-04 17:51:51 UTC
One addition to the workaround I mentioned above: You have to make sure that the contentview has a background (even though it is transparent) for it to work.
Comment 2 Jimmy [MSFT] 2017-05-08 21:06:47 UTC
Let me try to reproduce this issue with the information provided before I confirm the report. However this may be a duplicate of or related to bug 54425.
Comment 3 Jimmy [MSFT] 2017-06-23 18:24:33 UTC

*** This bug has been marked as a duplicate of bug 54425 ***