我的文档
public class MyDoc
{
public string Private {set;get;}
public string Public {set;get;}
}
MyFind.cs
public class MyFind
{
public string Find {set;get;}
public string News {set;get;}
private ObservableCollection<MyDoc> _list;
public ObservableCollection<MyDoc> List
{
get
{
if (_list == null)
{
_list = new ObservableCollection<MyDoc>();
}
return _list;
}
set
{
if (_list != value)
{
_list = value;
}
}
}
}
在 Page1.xaml.cs 中
MyFind myfind = new MyFind();
myfind.Find = Findtextbox.Text;//string = string
myfind.News = Newstextbox.Text;//string = string
myfind.List = ???
ObservableCollection = listbox1.??? (??? = Items,或 ItemsSources,或其他东西,...我可以使用 Convert 吗?)<------------ 我没有任何想法!帮我 !