Add BindingBase Bind overload + tests for nested path propagation#417
Add BindingBase Bind overload + tests for nested path propagation#417stephenquan wants to merge 1 commit intoCommunityToolkit:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a fluent Bind extension overload that accepts a BindingBase, enabling direct use of BindingBase.Create(...) (including nested-property bindings) while preserving the existing fluent Markup style.
Changes:
- Add
BindableObjectExtensions.Bind(..., BindingBase binding)convenience overload (wrapsSetBinding). - Add unit tests validating
BindingBase.Create(...)works with nested properties and propagates updates for OneWay/TwoWay bindings.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/CommunityToolkit.Maui.Markup/BindableObjectExtensions.cs |
Introduces a new Bind overload that applies a provided BindingBase to a target BindableProperty. |
src/CommunityToolkit.Maui.Markup.UnitTests/BindableObjectExtensionsTests.cs |
Adds coverage for the new overload using BindingBase.Create with nested property paths and change propagation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@TheCodeTraveler I believe this is ready to review. Code is done. Unit test done. No sample provided, but, I think we can forego the sample because the unit test is sufficient. As for docs, I will need help since we need to determine how to message the handlers approach vs BindingBase.Create approach (or both). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description of Change
Provide a fluent Bind extension method for BindableObject to support nested view models by adding BindingBase support to single value bindings (we already have BindingBase support for multi value bindings).
Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information