Bug 31874 - Unable to use Style setters for Attached BindableProperties
Summary: Unable to use Style setters for Attached BindableProperties
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.4
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-13 09:00 UTC by devastium777
Modified: 2015-07-14 03:00 UTC (History)
4 users (show)

Tags:
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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description devastium777 2015-07-13 09:00:04 UTC
Style setters are not able to instantiate attached BindableProperties.
Example:
<Style TargetType="ctr:ExtendedImage">
 <Setter Property="beh:TappableViewBehavior.TapCommand" Value="{Binding OpenPhotoCommand}"/> 
</Style>

public static class TappableViewBehavior
	{
public static readonly BindableProperty TapCommandProperty =
			BindableProperty.CreateAttached<View, ICommand>(
				bo => GetTapCommand(bo),
				default(ICommand),
				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.

Thanks..!
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