fix: Fix color picker button binding failure issue#4730
Conversation
|
Thanks HavenDV for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
|
@robloo mind having a quick look if you have a few minutes? |
|
I'll look at the last few issues and this together. Please give me this weekend to do it though. |
|
I confirmed the issue and this fix looks fine to me. It just never allows setting null to the non-nullable It is unfortunate another converter is needed for this but I can't think of a better way. |
|
Note that I made a more general-purpose converter in Avalonia to fix this. I'm not asking for any changes here but just FYI: |
ca1ad1f to
7f49e98
Compare
Fixes
Fixes #4721
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The current
SelectedValuebinding throws a Binding Failure error because it tries to return a nullColorproperty (due toBindingMode=TwoWay) that has a value typeWhat is the new behavior?
Added a helper converter that will ignore null values in
ConvertBack, replacing them withDependencyProperty.UnsetValuePR Checklist
Please check if your PR fulfills the following requirements:
Other information