public async Task NavigateToAsync <View, ViewModel>() where View : Page where ViewModel : BaseViewModel { View page = ViewsFactory.CreateBindedView <View, ViewModel>(); await GetMainPage().PushAsync(page); }
public App() { InitializeComponent(); var mainView = ViewsFactory.CreateBindedView <MainView, MainViewModel>(); Debug.WriteLine("MainPage is of type = " + mainView); MainPage = new NavigationPage(mainView); }