隐藏的WPF列表视图的列 [英] Hide the column of wpf listview

查看:93
本文介绍了隐藏的WPF列表视图的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让看不见的栏列表视图WPF的?
(一个方法是设置width属性最小lenth但没有妥善的解决办法)
谁能帮助我?

how to make column invisible of wpf listview? (one way is to set width property to minimum lenth but that not proper solution) can anyone help me?

推荐答案

有是这样做的一种方式的pretty简单的解释的here

There is a pretty simple explanation of one way of doing it here.

查找并删除列:

var temp = myGridView.Columns[0];
myGridView.Columns.RemoveAt(0);

将列在后面的观点:

Insert the column back in the view:

myGridView.Columns.Add(temp );
temp.Width = 0;
temp.Width = Double.NaN;

当你想隐藏它,当你想再次显示其重新列从列集合中删除它。

Remove it from the columns collection when you want to hide it and reinsert the column when you want to display it again.

这篇关于隐藏的WPF列表视图的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆