ListView column auto sizing

前端 未结 8 1955
执念已碎
执念已碎 2020-12-18 23:28

Let\'s say I have the following ListView:


  
    
            


        
8条回答
  •  伪装坚强ぢ
    2020-12-19 00:03

    Set Width="Auto" on your GridViewColumns. However, due to virtualization you may encounter some problems with auto-sizing.

    See this question.

    So, long-story-short, if you want accurate auto-sizing of columns you'll need to recalculate your widths when the visible data changes, due to virtualization.

提交回复
热议问题