Using enum as ComboBox value in WinUI3 doesn't work #10361
suhailmahmood
started this conversation in
General
Replies: 1 comment 4 replies
-
Xaml works based upon what is projected out to the Windows Runtime. ElementTheme is in the WinUI 3 metadata, it is in Microsoft.UI.Xaml.winmd. But have you actually made your BackdropType enum available to the Windows Rumtime? |
Beta Was this translation helpful? Give feedback.
4 replies
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.
-
Consider this XAML:
And the code behind:
The
ComboBoxItem
andBackdropType
types are as follows:ElementTheme
is fromMicrosoft.UI.Xaml
.The problem is, the Theme: ComboBox gets populated with the value set, which is "Light", but the Backdrop: ComboBox does NOT get populated with the value set, which is "Mica". Why is that? What am I missing?
P.S.: I am not looking for a solution to make it work - I can make it work in a number of ways. I am trying to understand why it works for one enum but doesn't for another.
P.P.S.: I posted this same question on SO but got no answer so far.
Beta Was this translation helpful? Give feedback.
All reactions