0

Hello everyone,

I'm writing an application with a ListView in C# WPF. I was wondering if I was missing a reference of something, because I get this error all the time: 'System.Windows.Controls.ListView' does not contain a definition for 'Columns' and no extension method 'Columns' accepting a first argument of type 'System.Windows.Controls.ListView' could be found (are you missing a using directive or an assembly reference?)

It's not only with MyListview.Colums but also when I want to add a multi-column item to my ListView, for example by following this.

MyListView.Items.Add("Column1Text").SubItems.AddRange(row1); This gives me the same error for SubItems

It's hard for me to explain, so if something isn't clear you can ask.

Gamer0077

Edit: I'm using Visual Studio 2010

Edited by Gamer0077

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Gamer0077
0

Hi Mitja Bonca,
I've already added the namespace System.Windows.Controls. Listview is a standard WPF control and the ListView is working, but not fully working.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.