Defining the model
Our model class is going to be fairly small. Its main purpose will be to encapsulate calls to the bootstrapper so as to present a simplified API to the viewmodel. Add a new C# class file to the Models
folder and name it BootstrapperApplicationModel
. Update it with the following code:
using Microsoft.Tools.WindowsInstallerXml.Bootstrapper; using System; using System.Windows; using System.Windows.Interop; namespace CustomBA.Models { public class BootstrapperApplicationModel { private IntPtr hwnd; public BootstrapperApplicationModel( BootstrapperApplication bootstrapperApplication) { this.BootstrapperApplication = bootstrapperApplication; this.hwnd = IntPtr.Zero; } public BootstrapperApplication BootstrapperApplication { get; private set; } public int FinalResult { get; set; } public void SetWindowHandle(Window view) { this.hwnd...