xamarin/Xamarin.Forms

Trigger Does Not Reset to Binding - Xamarin.Forms

开放

#5,422 创建于 2019年3月1日

 (0 条评论) (2 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/binding ⛓e/2 :clock2:good first issuehelp wantedinactivet/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南