M
mp
Hi
trying to populate a list view with data from objects contained in
collection
I'm getting the class name showing up in the listview not the values of each
property as i expected
what am i missing?
foreach loop populates collection
{...
myFuncs.Add(new FunctionInfo(FuncName, Signature, Foundin));
}
after for loop is done i try to fill listview with 3 columns with data from
3 properties of each obj in collection
lv1.Listview1.ItemsSource = myFuncs;
listview is filled but all entries in all collumns is classname
"WpfApplication1.FunctionInfo"
how do i get the values of the properties instead?
....the objects are defined thusly
myFuncs and FunctionInfo defined in FuntionList.cs
public class FunctionInfo
{
private String _Name;
private string _Signature;
private string _FileName;
public FunctionInfo(String name, string signature, string filename)
{this.Name = name;
this.Signature = signature;
this.FileName = filename;
}
public string Name
{
get { return _Name; }set { _Name = value; }}
public string Signature{get { return _Signature ; }set { _Signature =
value; }}
public string FileName{get { return _FileName; }set { _FileName = value; }}}
public class FunctionList :
System.Collections.ObjectModel.ObservableCollection<FunctionInfo>
{public FunctionList(): base(){}}
trying to populate a list view with data from objects contained in
collection
I'm getting the class name showing up in the listview not the values of each
property as i expected
what am i missing?
foreach loop populates collection
{...
myFuncs.Add(new FunctionInfo(FuncName, Signature, Foundin));
}
after for loop is done i try to fill listview with 3 columns with data from
3 properties of each obj in collection
lv1.Listview1.ItemsSource = myFuncs;
listview is filled but all entries in all collumns is classname
"WpfApplication1.FunctionInfo"
how do i get the values of the properties instead?
....the objects are defined thusly
myFuncs and FunctionInfo defined in FuntionList.cs
public class FunctionInfo
{
private String _Name;
private string _Signature;
private string _FileName;
public FunctionInfo(String name, string signature, string filename)
{this.Name = name;
this.Signature = signature;
this.FileName = filename;
}
public string Name
{
get { return _Name; }set { _Name = value; }}
public string Signature{get { return _Signature ; }set { _Signature =
value; }}
public string FileName{get { return _FileName; }set { _FileName = value; }}}
public class FunctionList :
System.Collections.ObjectModel.ObservableCollection<FunctionInfo>
{public FunctionList(): base(){}}