I have a ListBox bound to a collection of objects, and everything works except I don’t know how to call some code I need executed when an item in the list is selected.
To be clear, I have already hooked up the Listbox_SelectionChanged event for when the user selects a different item – and that works fine.
When the ListBox is first shown, though, I want to call that same code on the first item in the list, which it defaults to. Something like ListBox_BoundDataFinishLoading, or something..
Any ideas?
You could hook to the ItemList-Changed event and select the first item after it is added: