Click here to Skip to main content
15,886,106 members

Comments by Member 15061773 (Top 36 by date)

Member 15061773 7-Mar-23 10:58am View    
Thank you very much for your reply, I already asked this question with proper code in Microsoft question and answer forum.

Here is the link : https://learn.microsoft.com/en-us/answers/questions/1141456/how-to-refresh-combobox-items-at-runtime-when-comb

I can not understand what you saying by "You will probably need to define your own class which wraps the AudioDevice class". Any code guide will a great help.
Member 15061773 7-Mar-23 9:51am View    
Forgive me sir, Actually I am stuck here for almost 15 days. I don't mean that. You do enough help for me. Sorry.
Member 15061773 7-Mar-23 8:53am View    
Love the effort you put in to answer my question, but still I am unable to understand. I already asked this question with full code and proper explanation on Microsoft question and answer forum but I don't get any satisfied answer from there.

Here is the link : https://learn.microsoft.com/en-us/answers/questions/1141456/how-to-refresh-combobox-items-at-runtime-when-comb

Make sure that you read this question throughly, and give your decent code answer.
Member 15061773 7-Mar-23 7:15am View    
Again brilliant answer, I fully understand, ultimately what you say is option 2 is really better because observable collection will cascade to the ListCollectionView and automatically update the dropdown contents.

but any code guide on option 2? How can I declare an observable collection as itemsource for a ListCollectionView?

By the thank you very much for your crystal clear theory answer.
Member 15061773 7-Mar-23 6:49am View    
Your answer is outstanding, I already understand the theory part. In your first option you say, Whenever I get an updated devices list I need to update the ComboBox with a ListCollectionView and assigning it to the cmb1.ItemsSource.

Suppose, I open the ComboBox dropdown and at that time any of the item from the device list is unplugged or remove from the computer, How can I detect that?


I also understand your second option but I don't know how to apply it in code. I wish you can give me proper code example.