我想将page1.xaml中的项目添加到homepage.xaml,我创建了这个类
public class AllActors : LivingDataCommon
{
public AllActors()
: base(String.Empty, String.Empty)
{
}
public AllActors(String ID, String title)
: base(ID, title)
{ }
private ObservableCollection<ActorsObject> _AllActors = new ObservableCollection<ActorsObject>();
public ObservableCollection<ActorsObject> allActors
{
get { return this._AllActors; }
}
}
这是我在页面上选择项目时的按钮代码
private void Button_Tapped_1(object sender, TappedRoutedEventArgs e)
{
AllActors m = new AllActors();
m.allActors.Add((ActorsObject)itemGridView.SelectedItem);
}
但它没有添加任何东西,我的主页仍然是空的......
我的问题是我应该如何在homepage.xaml.cs中实现数据源代码才能使其正常工作?