Bug 59448 - IsClippedToBounds=false does not work for Frame Fast Renderer on Android
Summary: IsClippedToBounds=false does not work for Frame Fast Renderer on Android
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-13 12:20 UTC by damian
Modified: 2018-02-15 10:30 UTC (History)
4 users (show)

Tags: frame, isclippedtobounds, ac
Is this bug a regression?: ---
Last known good build:


Attachments
Example XAML (656 bytes, text/plain)
2017-09-13 12:20 UTC, damian
Details
No clipping occurring when using the standard (non-fast) Frame Renderer (11.67 KB, image/png)
2017-09-13 12:24 UTC, damian
Details
Attached screenshot showing clipping occurring using fast frame renderer. (12.53 KB, image/png)
2017-09-13 12:29 UTC, damian
Details


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 for Bug 59448 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description damian 2017-09-13 12:20:41 UTC
Created attachment 24723 [details]
Example XAML

With a Frame whose content is moved outside of the frame using TranslateX the Frame clips the content even if IsClippedToBounds is false.

I can cause clipping to NOT occur by defining my own Frame renderer derived from Xamarin.Forms.Platform.Android.FrameRenderer ... however if I derive from Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer then clipping occurs.

Attached is demo XAML.
Comment 1 damian 2017-09-13 12:24:54 UTC
Created attachment 24724 [details]
No clipping occurring when using the standard (non-fast) Frame Renderer

Default renderer overridden using:

[assembly: ExportRenderer(typeof(Frame), typeof(MyFrameRenderer))]
namespace AndroidFrameClippingShared.Droid
{
	public class MyFrameRenderer : Xamarin.Forms.Platform.Android.FrameRenderer
	{
	}
}
Comment 2 damian 2017-09-13 12:29:07 UTC
Created attachment 24725 [details]
Attached screenshot showing clipping occurring using fast frame renderer.
Comment 3 damian 2017-09-13 12:39:19 UTC
This is the workaround I am using:
[assembly: ExportRenderer(typeof(Frame), typeof(MyFrameRenderer))]
namespace AndroidFrameClippingShared.Droid
{
	public class MyFrameRenderer : Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer
	{
	  protected override void OnElementChanged(ElementChangedEventArgs<Frame> e) {
	    base.OnElementChanged(e);
	    ClipToOutline = Element.IsClippedToBounds;
	  }
  }
}
Comment 4 Paul DiPietro [MSFT] 2017-09-19 16:58:10 UTC
Are you calling Forms.SetFlags("FastRenderers_Experimental"); in your MainActivity (before calling Forms.Init())? I think an issue still lies here if it's being clipped, either way, but I want to clarify your usage.
Comment 5 damian 2017-09-21 06:56:22 UTC
I'm not calling Forms.SetFlags("FastRenderers_Experimental"); but I am running 2.3.4.270.
Comment 6 Marcos Cobeña Morián 2018-02-15 10:30:33 UTC
Hi!

I've just stumbled upon this issue with latest stable and as Paul mentions only happens when FastRenderers are enabled.

My 2 cents,

—Marcos