-
Notifications
You must be signed in to change notification settings - Fork 674
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 failed on DependencyProperty of nullable types #4937
Comments
@teaP and @MikeHillberg (or maybe @jevansaks) do you recall the issues/work around here? similar to the issues with NumberBox's value property. |
This isn't the same -- NumberBox.Value isn't nullable, it uses NaN as the unset value (which definitely caused OTHER binding issues because NaN != NaN). |
But IIRC we wanted to use nullable for NumberBox, but couldn't because of this problem. I think there's an open Issue on this, that nullable isn't generally supported in binding and/or some markup scenarios, except for built-in WUX types. We've worked around it for double types using NaN, int types using -1 or one of the infinities. I'm not sure how to work around it for a bool unfortunately; it doesn't have any magic values. |
Is there any progress or workaround on this? |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Describe the bug
See the attached sample.
The following property cannot be bound with a two-way binding.
Steps to reproduce the bug
1<Boolean>' to type 'IReference
1'; BindingExpression: Path='IsChecked' DataItem='App1.MyControl'; target element is 'Microsoft.UI.Xaml.Controls.Primitives.ToggleButton' (Name='null'); target property is 'IsChecked' (type 'Boolean')."Expected behavior
The binding should work without errors.
Version Info
[WinUI 3 - Project Reunion 0.5: 0.5.6]
Windows app type:
The text was updated successfully, but these errors were encountered: