Bug 33838 - Inconsistent background hit testing
Summary: Inconsistent background hit testing
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.4
Hardware: Macintosh Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-09-10 03:39 UTC by Caleb Clarke
Modified: 2016-12-14 04:22 UTC (History)
7 users (show)

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


Attachments
Sample project (241.39 KB, application/zip)
2015-09-11 00:07 UTC, Caleb Clarke
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 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:
Status:
RESOLVED ANSWERED

Description Caleb Clarke 2015-09-10 03:39:59 UTC
If a view has a null background, it (the background) will not be hit-tested and will not trigger a TapGestureRecognizer on Windows Phone. (as a opposed to a transparent background, which *will* still receive taps)

However, this is not the behavior on iOS... the view will receive taps regardless of the background color.

These are both standard behaviors for their platforms (I don't know what Android does), but Xamarin Forms should have a more consistent behavior across platforms in this regard.

(I would personally prefer the Windows-style behavior, as you could then achieve the iOS-style behavior by using a transparent background, whereas getting iOS to have the Windows-style behavior requires a custom renderer.. but the point is that it should be consistent either way)
Comment 1 Parmendra Kumar 2015-09-10 07:30:15 UTC
@Caleb Clarke,

I have tried to reproduce this issue and not able to reproduce it.
Could you please provide us sample project? so that we can reproduce it at our end.


Thanks.
Comment 2 Caleb Clarke 2015-09-11 00:07:13 UTC
Created attachment 12864 [details]
Sample project

Here is an extremely simple sample project. On iOS, taps will be registered in the output window wherever you tap. On WinPhone, they will only be registered when tapping on the label.
Comment 3 E.Z. Hart [MSFT] 2016-04-13 18:37:04 UTC
Still occurs in 2.1.0.6529
Comment 4 Paul DiPietro [MSFT] 2016-12-14 04:22:37 UTC
We have had other bugs filed that are related to this issue but I believe our consensus was that this sort of behavior was to stay in place. Setting background colors explicitly is a performance loss. If the documentation involving this behavior has not been updated it is something that could be in the future.