ItemsControl "Overflow to Popup"

I have an ItemControl that I want to fit in a small space. Usually it displays less than 3 elements, however I would like it to indicate when it has more objects than it can be displayed, and a pop-up window appears on the indicator to show all the elements (which will still be small).

The current item ItemsContainerPanel is a WrapPanel, which I hoped would provide a function of type Ellipsis of type TextBlock, but, alas, does not.

I'm having trouble finding the “number of visible items” to display my indicator. Can someone make a suggestion on how I can do this?

(The ItemsControl is part of a user control that can be resized, and the ItemsControl will resize, as indicated in the star column of the grid)

Thank you, Chris

+3
source share
3 answers

The ToolBar control has such functionality, you can probably replace the ToolBar ControlTemplate with one that does not look like a toolbar.

+1
source

, , , . . ArrangeOverride , , , .

0

mdm20, , ItemsControl ( , Border control), , , , , , ?

0
source

Source: https://habr.com/ru/post/1764861/


All Articles