-
Notifications
You must be signed in to change notification settings - Fork 690
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
C++/WinRT - Can't two-way bind primitive types to IInspectable #7986
Comments
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. |
This issue needs to be fixed, as it prevents basic tasks with x:Bind in a C++/WinRT application. Please anyone. |
Also, consider allowing C++ developers to contribute to the open-source XAML compiler. |
Hi, does this repro in WinAppSDK / WinUI3? Or just in WinUI2? Thanks! |
@JesseCol Yes, the generated code is still broken in WinUI 3. |
Describe the bug
Can't two-way bind a property of a primitive type to IInspectable because the generated code uses unknown_cast, which doesn't exist, instead of unbox_value.
Steps to reproduce the bug
Expected behavior
Generated code should correctly use unbox_value.
Screenshots
NuGet package version
WinUI 2 - Microsoft.UI.Xaml 2.8.1
Windows version
Windows 11 (21H2): Build 22000
Additional context
Workaround by defining unknown_cast in pch.h:
The text was updated successfully, but these errors were encountered: