I am having trouble binding selected item of a ListBox in my application (IDE : Visual Studio 2010, Language : C#, Technology : WPF and MVVM).
Requirement: There is a list of interfaces and another list of devices connected to each interface. The pattern of displaying these 2 lists is as follows:
Interface 1
Device 1
Device 2
Device 3
Interface 2
Device 1
Device 2
Interface 3
Device 1
Device 2
Device 3
Device 4
and so on.
If any interface is selected then by default the first device must be selected and if any device is selected then the corresponding interface must be selected. I am able to do the first part but not the second part. How can I make the selected Item to be unique across all the inner list of devices?
I want to display the above list as a list of expanders where each exapander will have the following format: Expander header : Interface name Expander Body : List of connected devices
I hope I am clear.
Please do tell me if there is any wpf control for this or should I develop a new ListBox for this?
Regards Kruthika