Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Core] Notify changes in a GradientStop (Color, Offset) #11783

Merged
merged 3 commits into from
Sep 4, 2020

Conversation

jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Aug 14, 2020

Description of Change

Detect GradientStop changes and update the Brush.

Fixes

API Changes

None

Platforms Affected

  • Core/XAML (all platforms)

Behavioral/Visual Changes

None

Before/After Screenshots

fix-gradientstop-changes

Testing Procedure

Launch Core Gallery and navigate to the brushes gallery. Select the Gallery "Update Brush Colors Gallery" and tap the "Update Colors" Button. If the GradientBrush is updated, the test has passed.

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

Copy link

@BretJohnson BretJohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI WPF apparently handles these scenarios by having a generic Changed notification on Freezables, sent whenever the object itself or anything underneath it changes. https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/freezable-objects-overview

Maybe we should consider something similar (now or in the future), that's a more generic change notification mechanism.

Xamarin.Forms.Core/VisualElement.cs Show resolved Hide resolved
@samhouts samhouts added retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. and removed retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. labels Aug 25, 2020
@samhouts samhouts changed the base branch from 4.8.0 to 5.0.0 August 26, 2020 21:30
@rmarinho rmarinho merged commit c1d1d52 into 5.0.0 Sep 4, 2020
@rmarinho rmarinho deleted the fix-gradient-update branch September 4, 2020 14:42
@samhouts samhouts added this to the 5.0.0 milestone Sep 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] GradientStop binding color isn't working
6 participants