Custom UI based on predefined one

May 22, 2015 at 7:58 AM
Is there any way to add a single custom msi dialog without describing a whole UI sequence?
Something like this:
<Product>
  <UIRef Id="InstallDir_Custom"/>
  ...
</Product>
....

  <Fragment>
    <UI Id="InstallDir_Custom">
      <UIRef Id="WixUI_InstallDir"/>
      <UIRef Id="WixUI_ErrorProgressText" />
      <DialogRef Id="MyCustomMSIDlg" />
      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="MyCustomMSIDlg" Order="3">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="MyCustomMSIDlg" Order="3">1</Publish> 
    </UI>
  </Fragment>
May 23, 2015 at 12:44 AM
It is rather a WiX question. If your code above works then you can just inject it:
project.Compiler.WixSourceGenerated += doc =>
            {
                doc.Root.Select("Product")
                        .Add(XElement.Parse("<your fragment XML>");
            };