-
Notifications
You must be signed in to change notification settings - Fork 665
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
Two Way binding for decimals causes System.AccessViolationException on property changed #9064
Comments
You are trying to bind a On the initial get a string can be retrieved because:
However, on set it will crash with the error |
That is correct, you must use a converter if you want to bind to a decimal instead of a double. Alternatively, you can do the conversion at the point of processing in C# if that is convenient. |
@eric-vogt-pacesetter Is the solution suggested by kmgallahan acceptable? |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
Describe the bug
If you add x:Bind for a decimal property when you update the value of the decimal it causes System.AccessViolationException.
Steps to reproduce the bug
Try to update the value of the number box in the application
Expected behavior
Should not cause exception
Screenshots
See above
NuGet package version
WinUI 3 - Windows App SDK 1.4.2: 1.4.231008000
Windows version
No response
Additional context
Windows 10 version 22H2 (19045, 2022 Update)
Visual Studio 2022
The text was updated successfully, but these errors were encountered: