Bug 31874 - Unable to use Style setters for Attached BindableProperties
Summary: Unable to use Style setters for Attached BindableProperties
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.4
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-07-13 09:00 UTC by devastium777
Modified: 2015-07-14 03:00 UTC (History)
4 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 devastium777 2015-07-13 09:00:04 UTC
Style setters are not able to instantiate attached BindableProperties.
<Style TargetType="ctr:ExtendedImage">
 <Setter Property="beh:TappableViewBehavior.TapCommand" Value="{Binding OpenPhotoCommand}"/> 

public static class TappableViewBehavior
public static readonly BindableProperty TapCommandProperty =
			BindableProperty.CreateAttached<View, ICommand>(
				bo => GetTapCommand(bo),
				propertyChanged: OnTapCommandChanged);

OnTapCommandChanged never invoked
Comment 1 Rajneesh Kumar 2015-07-13 09:51:07 UTC
I tried to reproduce this issue but unable to reproduce. Could you please provide us a small sample application that demonstrate this behaviour. That would be very helpful to reproduce this issue at our end.

Comment 2 devastium777 2015-07-14 03:00:32 UTC
It's strange but it looks like this is not Xamarin.Forms bug. Not working just for VS 2015 RC, due to different C# code compilator maybe.
Works fine on VS 2013 Community