xamarin/Xamarin.Forms

DynamicResources set in different conditions of DataTrigger correctly applies only value set in first DataTrigger.

オープン

#4,978 opened on 2019/01/14

 (1 件のコメント) (1 件のリアクション) (1 人の担当者)C# (1,926 件のフォーク)batch import
a/Xaml </>e/4 :clock4:help wantedinactivet/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

We have 2 colors (DynamicColor1, DynamicColor2) in Page's ResourceDictionary: 1 We have button which creates new random colors and updates these resource values: 2 We have 2 BoxView where we set its BackgroundColor to these resources: 3 We have BoxView where we set BackgroundColor to these colors in DataTriggers based on some condition (Switch's toggle state for instance): 4 By updating color resources first two BoxView's colors updated correctly. BoxView with colors set via DataTriggers updates its colors inconsistently.

Steps to Reproduce

  1. Run attached project.
  2. Press button "Update colors" several times - colors in top 2 boxes updated, bottom box tracks color of top left box.
  3. Toggle switch, press "Update colors" several times - bottom box should track color of bound top box (toggled=false - left, toggled=true - right).
  4. Toggle switch off, then on.
  5. Press "Update colors"

Expected Behavior

Bottom box should track color of top right box

Actual Behavior

Bottom box stuck at its previous color value.

Basic Information

  • Version with issue: Xamarin Forms 3.4.0.1008975
  • Last known good version: Unknown
  • IDE: Visual Studio

15.9.4

  • Platform Target Frameworks:
    • iOS
    • Android
    • UWP

Screenshots

dynamic_resource

Reproduction Link

DynamicResourceTest.zip

コントリビューターガイド