I am currently developing a WPF application using the Visual Basic language, I am looking to read a list of items from a standard text file (ObjectNames.txt, stored within the same directory as the application) and enter them into a combo box. I have been looking for a solution and have found only answers that call the "AddRange" method, a method that is used in Windows Forms applications but not WPF applications.
If anyone could tell me how I can accomplish this, I am still quite new to Visual Basic and WPF applications. I would also like the combo box to be cleared before the file is written into it as its contents depends upon the output of another control, I believe I can do this using "comboBox.Items.Clear" just before the read operation.
Any answers greatly appreciated, thank you!