我有一个遵循MVVM模式的Xamarin Forms应用程序,我想在Main Page构造函数上调用一个Splash Page,我有Navigation Command,只是不知道如何调用它。
MainPage.xaml.cs
public MainPage()
{
InitializeComponent();
BindingContext = new ViewModel.MainPageViewModel();
//here I would like to Call the SplashCommand
}
MainPageViewModel.cs
public MainPageViewModel()
{
this.SplashCommand = new Command(this.MethodThatNavigatesToSplashPage);
this._navigationService = DependencyService.Get<Service.INavigationService>();
}