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

Bryan Dam bryand at recastsoftware.com
Mon Aug 16 06:49:35 PDT 2021

FWIW: I went with option B in mine. Each wizard pane has its own view model to handle any UI logic but there's a shared bootstrapper view model that is sent in the constructor to each.   That shared view model doesn't hold any data; it just acts as a wrapper around Bootstrapper.Engine's variable and logging calls.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of B Rizzy via wix-users
Sent: Friday, August 13, 2021 10:00 PM
To: wix-users at lists.wixtoolset.org
Cc: B Rizzy <liquidair156 at yahoo.com>
Subject: [wix-users] Creating a Multi-page Custom Bootstrapper UI

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
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!!


WiX Toolset Users Mailing List provided by FireGiant https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=04%7C01%7Cbryand%40recastsoftware.com%7Ce45d48201b8b487a7daa08d95ec74ccb%7C9315bb44634846c6bd378880b87e774e%7C0%7C0%7C637645032361448463%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FtIertPjKPaHO%2BGG4Vi%2BAYKoK%2BDgYxGyNLhDnUDX4cg%3D&reserved=0

More information about the wix-users mailing list