
In Windows Explorer in Windows 7, items in ListView has flexible margin. So all of icons fit in region of ListView.
How can i make a panel which implemented like this? WrapPanel is most approaching that, it’s not flawless – a WrapPanel doesn’t fit items to it’s boundaries through adjusting margin.
Try using WrapPanel as your ListView’s item panel and disable the horizontal scrollbar:
ItemTemplate specifies how each item should be rendered. It has no effect on how items are laid out. ItemsPanel, by contrast, does specify the layout.
Also, you may want all items to be displayed the same size. You can find out how to do that from this article:
http://joshsmithonwpf.wordpress.com/2008/09/06/synchronizing-the-width-of-elements-in-an-itemscontrol/