Bug 30074 - Multiple DataTriggers on same data bound property don't always trigger (XAML)
Summary: Multiple DataTriggers on same data bound property don't always trigger (XAML)
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-05-14 09:34 UTC by Nando Covone
Modified: 2015-06-16 08:06 UTC (History)
7 users (show)

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

Xamarin.Forms multiple DataTriggers sample application (1004.05 KB, application/zip)
2015-05-14 09:45 UTC, Nando Covone

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 Nando Covone 2015-05-14 09:34:19 UTC
Created a Xamarin.Forms PCL project.
Added three BoxViews, two of which use multiple DataTriggers to change its color. The other uses a data binding on the Color property, and a Converter.
Each DataTrigger is bound to a user defined enum variable (with can have one of three discreet values)

A toggle button change's the viewmodel's state, which fires a property changed event, and updates the View.

The first and second DataTriggers work correctly the first time, on application start-up, and then anything goes!

The third BoxView, that uses a Converter, updates consistently and correctly.

There seems to be an issue with multiple DataTriggers inside the same Triggers section.

See attached project.
Comment 1 Nando Covone 2015-05-14 09:45:02 UTC
Created attachment 11201 [details]
Xamarin.Forms multiple DataTriggers sample application
Comment 2 Chris King 2015-05-19 17:20:59 UTC
Indeed. Expected behavior is to transition from red to green actual behavior for 1st and 2nd box is to remain red. Especially odd is that the second box changes it's opacity but not its color which would indicate the trigger is configured and firing but applying less than all the setters.
Comment 3 Stephane Delcroix 2015-05-26 07:57:35 UTC
All triggers are correctly applied here when the condition is true. The triggers are also unapplied when the condition become false. Unapplying the triggers reset their values to their previous values.
The order of applying/unapplying is what cause the observed behavior.
Comment 4 Rui Marinho 2015-06-15 14:27:10 UTC
Should be fixed in 1.4.3 final.
Comment 5 Parmendra Kumar 2015-06-16 08:06:45 UTC
I have checked this issue with Xamarin.Forms and its working fine at my end.

Hence closing this issue.

Environment info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.11.590.0