DynamicResources set in different conditions of DataTrigger correctly applies only value set in first DataTrigger.
#4,978 opened on Jan 14, 2019
Repository metrics
- Stars
- (5,644 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
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
