How do I disable bound ComboBoxItems in WinUI 3

youki 996 Reputation points


I have a bound ComboBox with separators and i want to disable them.

I am getting the item by ItemContainerGenerator to disable them but if I scroll the dropdown of the ComboBox up and down, the disabled items getting enabled.

Is this the proper way to do it or does this work in C# and it's a bug in C++/WinRT?

Please watch the demo video:

It seems to work as expected on the MainWindow.xaml (the main page) page but the ComboBox from the video is on an other page and is called by a frame in MainWindow.xaml.

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
722 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,523 questions
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
762 questions
{count} votes