maui
maui copied to clipboard
Fixed Custom Drawable does not support binding
[!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!
Root Cause
The BindingContext of the GraphicsView is not propagated to the Drawable object.
Description of Change
- Added an override for
OnBindingContextChangedinGraphicsViewto ensure that theBindingContextof theDrawableobject is updated when theBindingContextof theGraphicsViewchanges.
Public API Updates:
- Updated the
PublicAPI.Unshipped.txtfiles across various platforms (e.g., Android, iOS, macOS, Tizen, Windows, .NET Standard) to include the newOnBindingContextChangedoverride forGraphicsView.
Test Additions:
- Added a new manual test case (
Issue20991) to validate that customIDrawablecontrols correctly support data binding. This test includes aGraphicsViewwith a boundDrawableobject and a label describing the expected behavior. - Added an automated test for
Issue20991to verify that theGraphicsView'sDrawablebinding works as expected. The test uses Appium and NUnit to check for the presence of the label and validate the behavior via a screenshot.
Issues Fixed
Fixes #20991
I think we want use
BindableObject.SetInheritedBindingContext
@rmarinho , i have updated the code changes. please let me know if you have any concerns
@NirmalKumarYuvaraj Could you rebase and fix the conflicts? Thanks in advance.
@NirmalKumarYuvaraj Could you rebase and fix the conflicts? Thanks in advance.
@jsuarezruiz , i have rebased the branch. Please let me know if you have any concern.