Bug 59157 - Xamarin Forms Image IsEnabled not preventing touch
Summary: Xamarin Forms Image IsEnabled not preventing touch
Status: RESOLVED DUPLICATE of bug 36703
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-08-31 19:08 UTC by Andres
Modified: 2017-08-31 19:29 UTC (History)
2 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 Andres 2017-08-31 19:08:26 UTC
In a Xamarin.Forms project using an Image the IsEnabled Property is not responding to the BindingChanges. This is causing that when using a TapGesture on an Image it keeps responding to Tap events even when the IsEnabled property is set to false (via the Binded property).

The above is only happening on Xamarin.Forms Android. On Xamarin.Forms iOS this works as expected.

*Step to reproduce:*

Add an Image to the XAML and add a TapGesture with either an Event or a Command binded. Bind a property to the IsEnabled property of the Image and switch its value from False to True. For this I am adding a Switch. I can see the property is actually changing and firing the "PropertyChanged" event using an extra label

Something like:

	<Image x:Name="TestImage" Source="xamagon.png" IsEnabled="{Binding IsImageEnabled}" WidthRequest="300" HeightRequest="300" BackgroundColor="Azure">
			<TapGestureRecognizer  Command="{Binding ImageTappedCommand}" />

        <Switch IsToggled="{Binding IsImageEnabled, Mode=TwoWay}" />

        <Label Text="{Binding IsImageEnabled, StringFormat='Is Image enabled: {0}'}" HorizontalOptions="FillAndExpand" TextColor="DarkBlue" />

Note: using Xamarin.Android the above its working fine.

Note2: I could also provide a Github repo link with the sample I created to test.
Comment 1 Andres 2017-08-31 19:10:25 UTC
Reproduced on:

On both Visual Studio Professional 2017
Visual Studio for Mac
Comment 2 Jimmy [MSFT] 2017-08-31 19:27:19 UTC

*** This bug has been marked as a duplicate of bug 36703 ***
Comment 3 Andres 2017-08-31 19:29:29 UTC
I searched and couldn't find any. Sorry for that and Thanks.