You can create a list of scores groups, with specific view-models and views.
What I mean is, every set of scores has to be wrapped in a ScoresGroupViewModel, something like
Every group would use the same view
The view-model exposing all grouped scores, will use a simple ItemsControl to display all listboxes
With this approach, scores groups are defined through view-model, and the view is dinamically built. In case a specific group needs a different view, you can inherit from the base view-model class, put there some more logic and create a specifica view (something like 'Other scores, where just brief informations are displayed).
I hope this makes sense to you. Feel free to ask. :)
What I mean is, every set of scores has to be wrapped in a ScoresGroupViewModel, something like
publicclass ScoresGroupViewModel : PropertyChangedBase, IHaveDisplayName { publicstring DisplayName { get { ... } set { ... } } //Store here the 'name' of the group, just like "ABCScores"...public ObservableCollection<ScoreViewModel> Scores { get; privateset; } //Code omitted... }
<UserControl...><ListBoxx:Name="Scores".../><!-- Other than the individual scores, a proper header should be provided, displaying the DisplayName for group of scores --></UserControl>
<UserControl...><ItemsControlx:Name="ScoreGroups"/><!-- Use the appropriate Panel here... probably a vertical oriented StackPanel would suffice --></UserControl>
I hope this makes sense to you. Feel free to ask. :)