我在使用MvvmCross表单的主页和详细页面之间的问题上遇到了一些问题,该页面以空白方式打开。
class MasterPage : MasterDetailPage
{
public MasterPage()
{
var masterContentPage = new MasterContentPage();
masterContentPage.ListView.ItemSelected += (sender, e) => NavigateTo(e.SelectedItem as MasterPageItem);
Master = masterContentPage;
Detail = new PaymentMethodsListPage();
}
void NavigateTo(MasterPageItem menu)
{
Page displayPage = (Page)Activator.CreateInstance(menu.TargetType);
Detail = displayPage;
IsPresented = false;
}
}
如何将导航绑定到ViewModel?
感谢。