Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Shapes BackgroundColor invalidation #27398

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Fix Shapes BackgroundColor invalidation #27398

wants to merge 8 commits into from

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Fix invalidating Shapes BackgroundColor.

We can set the background of Shapes with BackgroundColor, Background and Fill. In the case of the Rectangle, everything is applied to the background of the Shape equally. Fill > Background > BackgroundColor, Fill overwrites Background and if Background is used it overwrites BackgroundColor.
With an Ellipse, setting Background or BackgroundColor applies to the Shape's background; but if BackgroundColor or Background is applied in combination with Fill, Fill will fill the Shape and BackgroundColor is applied to the background color of the View.
image

Issues Fixed

Fixes #18131

@jsuarezruiz jsuarezruiz added t/bug Something isn't working platform/windows 🪟 platform/android 🤖 area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing labels Jan 28, 2025
@Copilot Copilot bot review requested due to automatic review settings January 28, 2025 11:27
@jsuarezruiz jsuarezruiz requested a review from a team as a code owner January 28, 2025 11:27
@@ -5,6 +5,7 @@ namespace Microsoft.Maui.Controls.Handlers
{
public partial class RectangleHandler
{
internal static void MapBackground(IShapeViewHandler handler, Rectangle rectangle) { }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the case of the Rectangle, BackgroundColor, Background and Fill changes should perform the same task, and fill the background color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[regression/8.0.0-preview.4.8333] [iOS, Mac, Windows] Color changes are not reflected in the Rectangle shapes
1 participant