I’m using a WrapPanel in WPF to display images.
When resizing the form, these images are trying to take the maximum of the free spaces but when the picture can almost fill the space, there is a relatively big gap at the end of the WrapPanel.
What I would like to do is to share this space between the images before a new one fills this gap (like what Windows 7 Explorer is doing when displaying image icons).
I’m using a WrapPanel in WPF to display images. When resizing the form, these
Share
Lookout code of
BalancedWrapPanelfor WPF in this article.Or you may calculate Margin for Images how
((Width of WrapPanel) - (summ Width of Images)) / (Images count)and set this Margin property for Image type in WrapPanel Resources.