-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS, Mac, Windows] Fixed GraphicsView does not change the Background/BackgroundColor #31254
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
base: main
Are you sure you want to change the base?
Conversation
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| return new PlatformTouchGraphicsView(); | ||
| } | ||
|
|
||
| public override bool NeedsContainer => VirtualView?.Background is not null || base.NeedsContainer; |
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.
Could include a comment here explaining why we require the Container with a Background?
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.
@jsuarezruiz , Comment added. Please let me know if you have any concerns.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
left a comment
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.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| override Microsoft.Maui.Handlers.GraphicsViewHandler.ConnectHandler(Microsoft.Maui.Platform.PlatformTouchGraphicsView! platformView) -> void | ||
| override Microsoft.Maui.Handlers.GraphicsViewHandler.CreatePlatformView() -> Microsoft.Maui.Platform.PlatformTouchGraphicsView! | ||
| override Microsoft.Maui.Handlers.GraphicsViewHandler.DisconnectHandler(Microsoft.Maui.Platform.PlatformTouchGraphicsView! platformView) -> void | ||
| override Microsoft.Maui.Handlers.GraphicsViewHandler.NeedsContainer.get -> bool |
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.
Don't add these to publish shipped
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.
@PureWeen , Modified changes.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |

Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
This pull request addresses an issue where the
GraphicsViewcontrol did not properly apply or update itsBackgroundorBackgroundColorproperties on iOS, macOS, and Windows platforms. The changes introduce a new test case to verify the fix, update platform-specific handlers to ensure backgrounds are rendered and updated correctly, and make sure the handler uses a container when needed for background rendering.GraphicsView background rendering and updates:
Issue31239) and corresponding drawable to verify thatGraphicsViewcorrectly applies and updates itsBackgroundandBackgroundColorproperties. This includes a UI for dynamic property changes and a button to trigger updates.Issue31239) to automatically verify that background changes are visually applied, with screenshots before and after changing properties.Platform handler improvements:
NeedsContainerproperty inGraphicsViewHandlerto returntruewhen a background is set, ensuring proper rendering. [1] [2]Backgroundproperty changes.Backgroundproperty changes.Validated the behaviour in the following platforms
Regression PR - #26368
Issues Fixed
Fixes #31239
Output
Before.mov
After.mov