Conversation
Basically, I don't want to ever create a SolidColorBrush object in either XAML or code, I just want to specify the color. There should be an implicit converter so that |
@jcmanke This PR is still a Draft and we continue working on it so, thanks for your feedback. A TypeConverter was added to allow |
66dc007
to
a72206a
Compare
I had a closer look at the source and the sample inside the Gallery. Your example contains two for a LinearGradientBrush, where one is
and the other one is
But should it not be like this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is failing the Automated platform tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general comment I would say the updatebrush/updatecolor code in the renderers should be consistently setup so updatecolor isn't called if the user sets the brush
For example in TabbedPageRenderer both updates get called when the control is initialized.
https://github.com/xamarin/Xamarin.Forms/pull/9220/files#diff-7feeca82b01e77527e9263a06421f443R782
I think in general UpdateColor/UpdateBrush code should always just call into UpdateBrush and then if the Brush is set call that code otherwise call UpdateColor
For example on ImageButtonRenderer here they both call the same method
https://github.com/xamarin/Xamarin.Forms/pull/9220/files#diff-8295d11d94d3eaa6d894cb727a46be12R104
We don't have to make this change as part of this PR but I wonder how much of this should be at the xplat layer. Can we make it so all the Color properties just set the Brush?
…Forms into forms-gradients
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase to fix conflicts, then merge!!!! THANKS! :D
@PureWeen Reviewed Shell FlyoutBackground: |
Description of Change
Added Brushes support. A Brush "paints" an area with its output. Different brushes have different types of output. Some brushes paint an area with a solid color and others with a gradient.
Examples:
Using the new Background property you can set the background of any Page, Layout or View using a Brush.
Issues Resolved
API Changes
Added:
GradientBrush
GradientStop
SolidColorBrush
LinearGradientBrush
RadialGradientBrush
Platforms Affected
Behavioral/Visual Changes
None
Testing Procedure
Launch Core Gallery and navigate to the new Gradients Gallery.
Screenshots
Notes
PR Checklist