dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.63k stars 1.62k forks source link

Android : Border Stroke GradiantBrush can only switch to another gradiantbrush #22042

Open Skarzag opened 2 weeks ago

Skarzag commented 2 weeks ago

Description

Hi, I just saw that when i set the Stroke of a Border with a gradiant resources, i can't change it back to a classic color or even a solidcolorbrush. For exemple switch from a gradiant to a gray color don't work and the gradiant stay.

So i tried by setting a fake gradiant with 2 stops of the same color (gray) and it worked.

Tried on Android only but the problem could exist on other platforms, dunno

Steps to Reproduce

Add GradiantBrush to Colors.xaml Add a border to your xaml with a tapgesture. Switch from a color to another.

Hope you'll find a way to fix that !

Also... if you have plan to add gradiant on textcolor, it could be nice :p This is my first time reporting a bug, hope i've done it right :)

Link to public reproduction project repository

https://github.com/Skarzag/MauiAppGradiantBorder

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

RoiChen001 commented 2 weeks ago

Can repro this issue at android platform on the latest 17.10 preview 5(8.0.7&8.0.21).