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
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:
We have button which creates new random colors and updates these resource values:
We have 2 BoxView where we set its BackgroundColor to these resources:
We have BoxView where we set BackgroundColor to these colors in DataTriggers based on some condition (Switch's toggle state for instance):
By updating color resources first two BoxView's colors updated correctly. BoxView with colors set via DataTriggers updates its colors inconsistently.
Steps to Reproduce
- Run attached project.
- Press button "Update colors" several times - colors in top 2 boxes updated, bottom box tracks color of top left box.
- Toggle switch, press "Update colors" several times - bottom box should track color of bound top box (toggled=false - left, toggled=true - right).
- Toggle switch off, then on.
- 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
