WPF ListView grows wider in response to resizing column, but does not shrink back

前端 未结 1 1889
误落风尘
误落风尘 2021-01-21 01:29

In the following .NET 3.5 XAML, if you drag the column width of the \'Day\' column wider, the ListView nicely grows to account for this. If you then drag the column width narro

相关标签:
1条回答
  • 2021-01-21 01:56

    In general, all WPF ItemsControls are "grow-only", meaning that we do the initial layout pass and subsequently the control will only resize larger if the content changes. The reason we don't resize smaller by default is that it would require an expensive measure and arrange pass, which would negatively impact performance

    ref: codeplex thread

    0 讨论(0)
提交回复
热议问题