开发者

Possible to Freeze Columns in a WPF ListView/GridView?

开发者 https://www.devze.com 2023-01-02 21:17 出处:网络
I currently have a GridView inside a ListView.View.The GridView columns will far exceed the width of the screen, so there will always be horizontal scrolling.

I currently have a GridView inside a ListView.View. The GridView columns will far exceed the width of the screen, so there will always be horizontal scrolling.

What I would like to do is to have certain columns always remain on the screen regardless of scrolling. So the first x columns from the left are开发者_运维知识库 frozen (ala Excel), and the rest can scroll.

It does not need to be dynamic/user selected--I know in advance which columns need to be frozen.

Is this possible?


Quick and dirty solution would be to use two listviews next to each other. Left one would be for the frozen columns and right one would have horizontal scrolling enabled. If you need vertical scrolling you can wrap both listviews in a scrollviewer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号