I have a WPF ListView with ItemsPanel as below. The Listview holds a collection of images. When I resize/sizechanged the window, I want the images to shrink/expand until the next image fit. My goal is to remove the unwanted space at the end of each row in the listview. Any help will be appreciated.
<Setter Property="ItemsPanel"><Setter.Value><ItemsPanelTemplate><WrapPanel Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}" ItemWidth="{Binding (ListView.View).ItemWidth, RelativeSource={RelativeSource AncestorType=ListView}}"/></ItemsPanelTemplate></Setter.Value></Setter>