简体   繁体   中英

How to reposition static text elements in standard WiX UI dialogs?

I'm using the WiX Mondo UI dialogs set for my installer, with a custom background image that has some textures that conflict with the dialogs text in their default positions.

How can I control to (X,Y) position of the static text controls in these dialogs?

For example, I'd like to move around the title and description in the welcome dialog. Based on this post , I tried several variations of the following snippet, with no success:

<Publish Dialog="WelcomeDlg" Control="Title" Property="Y" Value="150" Order="3">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Description" Property="Y" Value="250" Order="3">1</Publish>
  1. What is the correct way to do that?
  2. How can I find the authoritative names of dialogs and static text controls, and their default properties (positions and dimensions)? (I got the names I tried playing with from looking at the WiX SDK localization files, searching for the welcome dialog strings, guessing that the string named "WelcomeDlgTitle" is related to the control "Title" in the "WelcomeDlg" dialog - but I'm not sure about that...)

EDIT: Adding an example of implementing the correct answer.

So, I can see that the Title control of the WelcomeDlg is at position Y=20 from looking at the source code .

I can change this from 20 to 100 by adding a foo.wxl localization file to my WiX project that looks like this (full working file):

<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
  <UI Dialog="WelcomeDlg" Control="Title" Y="100" />
</WixLocalization>
  1. You need to use UI elements, not Publish elements and they need to go in a .wxl localization file.
  2. There's no reference but there is source code: https://github.com/wixtoolset/wix3/tree/develop/src/ext/UIExtension/wixlib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM