Click here to Skip to main content
15,893,337 members
Articles / Desktop Programming / WPF

Auto Sizing WPF GridView Class

Rate me:
Please Sign up or sign in to vote.
3.00/5 (2 votes)
7 Aug 2020CPOL3 min read 13.8K   697   4  
Implements automatic column width sizing based on item contents for ListViews using GridView
AutoSizingGridView is a class used with Microsoft WPF ListViews which automatically sizes GridViewColumns based on dynamic content. The basic GridView class already sizes itself automatically, but the sizing is done based on initial visible content. AutoSizingGridView extends this to react to new ListViewItems and, optionally, to changes in content for existing items. AutoSizingGridView manages column width, but uses the default GridView support for row height maintenance. You may find you need to tweak the code to support changes in non-text (e.g., image-based, or complex cells) data.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions