How to add custom message with alignment in Welcom

2019-08-19 23:21发布

问题:

I used this line in wxl file to add custom message but still not able to align the version number properly

  <String Id="WelcomeDlgDescription" Overridable="yes">The Setup Wizard will install [ProductName] on your computer. Click Next to continue or Cancel to exit the Setup Wizard.&#13;&#10;&#13;&#10;&#13;&#10;{\WixUI_Font_Title}Version - [ProductVersion]</String>

I want the results to be like this

Also, I am not able to change the fonts.

Updated

I am able to achieve this. Version left hanging in the middle and not going at the end,

回答1:

Limitation: It looks like you can only have one style per string. I am not sure, but it says in the documentation that you have to refer to the style at the beginning of the string:

<TextStyle Id="Test" FaceName="Arial" Blue="255" Size="12" Strike="yes" />

<..>

<String Id="WelcomeDlgDescription">{\Test}Version - [ProductVersion]</String>
  • Adding Controls and Text
  • ICE31 - validation suite checking Strings and fields (see Examples)

Customizing WiX Dialogs: You might need to change the whole dialog to add two fields so you can put the version number in its own text box featuring its own style. Doing so is a little involved, and I have a description of it here: Customizing WiX Dialogs. Please have a quick read. It also describes how to change font color and style.

Update: Nice little sample for how you can insert a custom dialog: Wix UpgradeVersion.