VB.NET - How to know whether the listbox is empty or not? In WPF

Asked By Mital Rakholiya on 22-Jan-20 11:51 AM
Condition to check listbox is with data or without data

if(listbox1.SelectedIndex == -1)
'''
;''

NOT WORKING???
Robbe Morris replied to Mital Rakholiya on 29-Jan-20 08:20 PM
That just shows the selected index not the number of items in a ListBox.  If I remember right, there is an Items collection that you'd want to check the count for.