xamarin/Xamarin.Forms

Trigger Does Not Reset to Binding - Xamarin.Forms

Aperta

#5422 aperta il 1 mar 2019

 (0 commenti) (2 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/binding ⛓e/2 :clock2:good first issuehelp wantedinactivet/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor