[wix-users] Creating a Multi-page Custom Bootstrapper UI

B Rizzy liquidair156 at yahoo.com
Fri Aug 13 19:00:22 PDT 2021


Hi All,

I've spent the better part of a month now learning WiX to create a custom installer with WPF. I've been using these wonderful tutorials as a guide:

Custom WiX Managed Bootstrapper Application
Part 1 of Writing Your Own .Net-based Installer with WiX - Overview - Musing, Rants & Jumbled Thoughts of John M. Wright
https://frozencloud.wordpress.com/category/wix/
Grow from a Newbie to Pro in Creating Installers | Syncfusion Blogs

However, I've ground to a halt in my progress and exhausted Google. These tutorials all use a single view and viewModel whereas I want to create something more traditional: Intro page -> License -> Install Location -> Install with progress, etc. And that seems to be the big trick. 
This seemingly requires the single viewModel to be split up into page-specific viewModels. For instance, the uninstall command belongs in the uninstall VM, the progress properties and event handlers belong on the Install VM, etc. But then certain data (the model and InstallState) appear to need to be passed from VM to VM. 
Or, we can have the single viewModel be global so each page can get the data it needs at the time.
I'm really struggling on how to actually make this work (self-taught C#/WPF) and was wondering if anyone had some pointers as to a/the correct approach? 
The only things I can think to do are:

a) Keep everything on a single page like the tuts and simulate multiple pages by having all views on a single page and showing/hiding the relevant elements as needed.
b) just keep passing the "WixViewModel" via the constructors from view1 to view2, to viewModel2, then from view2 to view3 to viewModel3, etc.
I'm confident I could get both the above working but that would be smelly, smelly code. Any better suggestions?

And my apologies if I'm not clear; I don't always have the language to describe the problem but I am happy to clarify.

Thank you all for your help!!

Brian 




More information about the wix-users mailing list