I've been trying to figure this out for a few days now and I can't seem to get anywhere.
I'm working on a labeling system and to do this I have an ItemsControl that loops over an ObservabelCollection of view models and creates a child control for each item and adds that to a WrapPanel. The problem I'm running into is that the WrapPanel needs to be set to a maximum width and height, so I need to determine when the content of the wrappanel is at it's maximum width and if it is at it's max then add a +(number) to the end that indicates to the user that there are more labels applied that are not shown.
The labels can be anywhere from 1 character to 32 so I'm not sure if there's a way to use a grid with a variable number of columns with the last column being used to show the count of labels? We are trying to do this following the MVVM pattern so hopefully staying away from code behind is an option.
I would appreciate any input or help on this one, I didn't see anything like this on SO but if there is I apologize in advance.