/// <summary>Registers the view model for state handling. </summary> /// <param name="viewModel">The view model. </param> /// <param name="page">The page. </param> public static void RegisterViewModelForStateHandling(IStateHandlingViewModel viewModel, MtPage page) { page.PageStateHandler.SaveState += (sender, args) => viewModel.OnSaveState(args); page.PageStateHandler.LoadState += (sender, args) => viewModel.OnLoadState(args); }
/// <summary>Registers the view model for state handling. </summary> /// <param name="viewModel">The view model. </param> public void RegisterViewModelForStateHandling(IStateHandlingViewModel viewModel) { ViewModelHelper.RegisterViewModelForStateHandling(viewModel, this); }