You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addresses review feedback that the original change over-promised support
for third-party implementations of the new interface.
The public read contract is unchanged and still solves the blocker: an
external backend can pattern match `IView.Background` and read the image
source with no reflection and no internals access.
What changed:
- Document the interface as consumption-only. Implementing it outside of
.NET MAUI is explicitly unsupported, and .NET MAUI reserves the right to
add members in future releases.
- Revert the in-tree pattern matches back to the internal `ImageSourcePaint`.
Custom paints were never reliably honored: specialized handlers such as
`LayoutHandler.MapBackground` call `UpdateBackground` directly and bypass
the image-source path, and `Brush`'s paint-to-brush conversion only
round-trips an `IImageSource` that is a Controls `ImageSource`. Matching
the concrete type keeps behavior provably identical to before, making this
change purely additive.
- Drop the tests asserting that externally-authored paints implementing the
interface are supported. The remaining tests prove a fake external backend
can pattern match and read MAUI's built-in internal image paint through
public API only, without implementing the interface itself.
- Document that values arise as a `Paint` from `IView.Background`, that a
null `ImageSource` means an image background with nothing to draw, and how
this differs from `Microsoft.Maui.Graphics.ImagePaint`, which carries an
already-loaded `IImage`. Both are covered by new tests.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ec0bf62-da2c-49fb-af27-a0a79cbbd6bb
0 commit comments