public AddingMachinePage(AdderViewModel viewModel) { InitializeComponent(); // Set ViewModel as BindingContext. BindingContext = viewModel; }
public App() { // Instantiate and initialize ViewModel for page. adderViewModel = new AdderViewModel(); adderViewModel.RestoreState(Current.Properties); MainPage = new AddingMachinePage(adderViewModel); }