1. Add this code in the control load
Decorator borderForSourceListView = VisualTreeHelper.GetChild(this.sourceListView, 0) as Decorator;
ScrollViewer scrollViewerForSourceListView = borderForSourceListView.Child as ScrollViewer;
this.SetWidthForListViewItem(this.sourceListView, (int)scrollViewerForSourceListView.ViewportWidth);
scrollViewerForSourceListView.ScrollChanged += new ScrollChangedEventHandler(scrollViewerForSourceListView_ScrollChanged);
2. Implement the scrollViewerForSourceListView_ScrollChanged
private void scrollViewerForSourceListView_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
if (sender is ScrollViewer)
{
ScrollViewer scrollViewer = sender as ScrollViewer;
this.SetWidthForListViewItem(this.sourceListView, (int)scrollViewer.ViewportWidth);
//Debug.WriteLine("e.ViewportWidthChange" + e.ViewportWidthChange);
}
}
3. Implement the SetWidthForListViewItem, you can set the width for the listview items in this method