-
- Nir Hasson
- Posts: 71
- Joined:
- Contact:
Toggle Visiblity of List View Column
I have a ListView with couple of pre-defined columns.
Each column displays it's own custom template using the CellTemplate property.
During the application runtime I have to show/hide some columns depending on real time data I'm getting.
How can I accomplish this task ?
Each column displays it's own custom template using the CellTemplate property.
During the application runtime I have to show/hide some columns depending on real time data I'm getting.
How can I accomplish this task ?
-
-
sfernandez
Site Admin
- Posts: 3222
- Joined:
Re: Toggle Visiblity of List View Column
The easiest way of hiding a ListView Column is setting its GridViewColumn definition Width to 0.
If you want to handle this from a MVVM perspective, you can use attached properties as explained here: http://wickedflame-dev.blogspot.com.es/ ... um-of.html
Code: Select all
<GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" Width="0"/>
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests