Assigning a Brush of type RadialGradientBrush to the Background property of an ImageButton causes the BG to show a solid color
Description
When set to a value of type RadialGradientBrush the Background is shown as a solid color background with the color of the last GradientStop (Offset="1").
Changing the Background property's value to something else during debugging and then changing it back again causes it to show correctly (NOT a workaround).
Might have been caused by this fix: #22717
LinearGradientBrushs work just fine.
Steps to Reproduce
Create a MAUI app and a LinearGradientBrush as a resources
Place an ImageButton in the UI and pass the created LinearGradientBrush as a Background
Observe the bug.
Link to public reproduction project repository
No response
Version with bug
8.0.60 SR6
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.0-rc.1.9171
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- GradialRadientBrush not working as expected on Android (#14581), similarity score: 0.79
- Can't use LinearGradientBrush as Button Background on iOS (#20218), similarity score: 0.78
Closed similar issues:
- [mauipalooza] ImageButton doesn't render gradient brush background (#5929), similarity score: 0.80
- [Android] Border Background not changed to Brush once we set the Gradient (#7885), similarity score: 0.79
-
RadialGradientBrushwithCenterrendering is broken on Windows (#8361), similarity score: 0.77
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
This issue has been verified and can repro on Android platform using Visual Studio 17.12.0 Preview 3(9.0.0-rc.2.24503.2, 8.0.92 & 8.0.3,8.0.0-rc.1.9171), while 7.0.101 works fine.MauiApp1.zip
I guess there's nothing on that