Implementing the viewmodel
Now let's move on to viewmodel. Add a new C# class file to the ViewModels
folder and name it InstallViewModel
. Add the following code:
using CustomBA.Models; using Microsoft.Practices.Prism.Commands; using Microsoft.Practices.Prism.ViewModel; using Microsoft.Tools.WindowsInstallerXml.Bootstrapper; using System; using System.Windows.Input; namespace CustomBA.ViewModels { public class InstallViewModel : NotificationObject { public enum InstallState { Initializing, Present, NotPresent, Applying, Cancelled } private InstallState state; private string message; private BootstrapperApplicationModel model; public ICommand InstallCommand { get; private set; } public ICommand UninstallCommand { get; private set; } public ICommand CancelCommand { get; private set; } public string Message { get ...