Getting 'unknown_cast' error while binding ComboBox SelectedValue attribute. #7484
Unanswered
geniuszombie
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Selected value for ComboBox should be an int32_t. C++ will allow you to assign a int16_t to int32_t directly but you'll receive a warning. I don't think the XAML compiler knows this so change it to int32_t |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi,
Also, where can I find the documentation on what data type must be used for a given attribute? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to bind ComboBox ItemsSource attribute as follows in my C++/WinRT project but getting the error that I have mentioned in the title.
ComboItems collection contains a list of object that has key and text variables with the types of
int16_t
andhstring
. ViewModel ItemKey variable is also anint16_t
. With this setup I am getting following errors in generatedxaml.g.hpp
file.Generated file content for the related code is follows,
Is this a bug or am I doing somethinig wrong?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions