Skip to content
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

Binding cannot reste a nullable property to null #16004

Closed
dr1rrb opened this issue Mar 22, 2024 · 1 comment · Fixed by #16023
Closed

Binding cannot reste a nullable property to null #16004

dr1rrb opened this issue Mar 22, 2024 · 1 comment · Fixed by #16023
Assignees
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/binding 🪢 Categorizes an issue or PR as relevant to the binding engine triage/untriaged Indicates an issue requires triaging or verification

Comments

@dr1rrb
Copy link
Member

dr1rrb commented Mar 22, 2024

Current behavior

If a IValueConverter.ConvertBack() returns null for a binding to a nullable property (e.g. int?) the property won't be updated

Expected behavior

Reset to null like on windows

How to reproduce it (as minimally and precisely as possible)

TestBindingTypes.zip

  1. In the "TextBox" column, on the int? line, enter something like "15"
  2. Observe the line bellow, you now have "/ Model: 15 /"
  3. Clear the content of the TextBox
  4. Observe the line bellow, you still have "/ Model: 15 /" while on windows it's now "/ Model: /" (i.e. the property has been set to null)

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

@dr1rrb dr1rrb added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Mar 22, 2024
@dr1rrb
Copy link
Member Author

dr1rrb commented Mar 22, 2024

Related to #15349 (reply in thread)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/binding 🪢 Categorizes an issue or PR as relevant to the binding engine triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants