I have a collection of objects which I bind to a ListBox, but I actually only want to display the selected element, and not the entire collection. What’s the best way to go about this? Use a different control?
I think I can do a Visibility ValueConverter which checks the IsSelected attribute — and if not selected collapses… but I’m still interested in other ideas.
Since the entire purpose of a
ListBoxis to display multiple items and provide the user with a way to select them, yes, I’d use a different control.Or you could do this, which is getting into the territory of stupid: