I am working in MVVM and my view has several listboxes that successively switch to “visible” after the previous SelectedItem is changed.
(IE when an item in Listbox1 is selected, Listbox2 becomes visible and so on.)
I know that I need to subscribe to the event when the IsSelected property has changed, but I need to know HOW to do this in my ViewModel/what other snippets of code I need in order to “do something” with the selected item and “do a specific something” when the event has occured for the specific listbox so that I can trigger the next Listbox to visible. Would this be considered “Creating a custom event”? And, how to subscribe to it.
Thank you 🙂
In the XAML, set the Combo or list’s SelectedItem property like so:
In the ViewModel, create a property for MySelectedItem: