xamarin/Xamarin.Forms

Trigger Does Not Reset to Binding - Xamarin.Forms

Open

#5,422 opened on Mar 1, 2019

 (0 comments) (2 reactions) (0 assignees)C# (1,926 forks)batch import
a/binding ⛓e/2 :clock2:good first issuehelp wantedinactivet/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

The issue occurs when the xaml element has a binding and a trigger. When the trigger resets 'back', the binding is lost.

Steps to Reproduce

  1. Open the sample app. I tested in Uwp.
  2. Change the color using the provided Picker. The BoxView changes to the selected color.
  3. Use the ‘Is Enabled’ switch to toggle the box to Disabled. This will cause the Trigger to fire.
  4. Use the ‘Is Enabled’ switch - the color reverts back to the original bound color.
  5. Select a new color in the picker.

Expected Behavior

The Color is still Bound to the selected Picker item.

Actual Behavior

The Color is stuck at the value it originally had, and will only respond to the Trigger, not the Binding.

Basic Information

  • Version with issue: 3.4.0.1008975 and 3.5.0.169047
  • Last known good version: Unknown
  • IDE: VS2017
  • Platform Target Frameworks:
    • UWP: 16299
  • Nuget Packages: None
  • Affected Devices: Windows 10, 1803

Screenshots

  1. The control is bound correctly... image
  2. The control responds to a the bound object changing... image
  3. The control responds to the trigger, which turns it yellow... image
  4. The control responds to the trigger resetting... image
  5. Bug - the control does not respond to the bound value image

Reproduction Link

https://github.com/jkastner/XamFormsBugSample_Triggers

Contributor guide