I have a class as below.
namespace WpfApplication2
{
class TaskItem
{
private string name;
private string item;
private string description;
private int priority;
public string Name
{
get
{ return name; }
set
{ this.name = value; }
}
public string Item
{
get
{
return item;
}
set
{
this.item = value;
}
}
public string Description
{
get
{
return String.Format("{0} {1}",name,item);
}
}
public int Priority
{
get
{
return priority;
}
set
{
this.priority = value;
}
}
public TaskItem()
{
}
}
}
I want to return the list of this class object to my wpf application as below.
<WpfApplication2:TaskItem x:Key="taskItem"/>
After that I will bind this to ListBox. How could I return this list of class object? Please advise. Thanks.