WIX组合框填充值

WIX组合框填充值,wix,wix3.7,Wix,Wix3.7,是否有人知道如何使用WIX设置将值填充到combobox中。由于我在过去几周内一直在尝试,因此无法实现这一点。在尝试执行我的MSI时,combobox没有出现。下面提供了我的操作。请帮助我 <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate /> <Feature Id="

是否有人知道如何使用WIX设置将值填充到combobox中。由于我在过去几周内一直在尝试,因此无法实现这一点。在尝试执行我的MSI时,combobox没有出现。下面提供了我的操作。请帮助我

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />

    <Feature Id="ProductFeature" Title="SetupProjectComboTest" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
    </Feature>

<UI>
  <UIRef Id="WixUI_FeatureTree" />
  <ComboBox Property="WIX_VERSIONS">
    <ListItem Value="Windows Installer XML 3.0" />
    <ListItem Value="Windows Installer XML 3.5" />
    <ListItem Value="Windows Installer XML 3.6" />
  </ComboBox>
  <Dialog Id="MyCustomDlg"  Width="500" Height="260">
    <Control Id="ComboBoxMain" Type="ComboBox" X="10" Y="60" Width="300" Height="17" Property="WIX_VERSIONS" />
    <Control Id="ButtonMain" Type="PushButton" X="320" Y="60" Width="40" Height="17" Text="Show">
      <Publish Property="COMBOVALUEFORMATTED" Order="1"  Value="You've chosen the [WIX_VERSIONS] version of the toolset" />
    </Control>
    <Control Id="LabelMain" Type="Text" X="10" Y="80" Width="360" Height="17" Property="COMBOVALUEFORMATTED" Text="[COMBOVALUEFORMATTED]" />

  </Dialog>
</UI>

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />

    <Feature Id="ProductFeature" Title="SetupProjectComboTest" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
    </Feature>

<UI>
  <UIRef Id="WixUI_FeatureTree" />
  <ComboBox Property="WIX_VERSIONS">
    <ListItem Value="Windows Installer XML 3.0" />
    <ListItem Value="Windows Installer XML 3.5" />
    <ListItem Value="Windows Installer XML 3.6" />
  </ComboBox>
  <Dialog Id="MyCustomDlg"  Width="500" Height="260">
    <Control Id="ComboBoxMain" Type="ComboBox" X="10" Y="60" Width="300" Height="17" Property="WIX_VERSIONS" />
    <Control Id="ButtonMain" Type="PushButton" X="320" Y="60" Width="40" Height="17" Text="Show">
      <Publish Property="COMBOVALUEFORMATTED" Order="1"  Value="You've chosen the [WIX_VERSIONS] version of the toolset" />
    </Control>
    <Control Id="LabelMain" Type="Text" X="10" Y="80" Width="360" Height="17" Property="COMBOVALUEFORMATTED" Text="[COMBOVALUEFORMATTED]" />

  </Dialog>
</UI>

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />

    <Feature Id="ProductFeature" Title="SetupProjectComboTest" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
    </Feature>

<UI>
  <UIRef Id="WixUI_FeatureTree" />
  <ComboBox Property="WIX_VERSIONS">
    <ListItem Value="Windows Installer XML 3.0" />
    <ListItem Value="Windows Installer XML 3.5" />
    <ListItem Value="Windows Installer XML 3.6" />
  </ComboBox>
  <Dialog Id="MyCustomDlg"  Width="500" Height="260">
    <Control Id="ComboBoxMain" Type="ComboBox" X="10" Y="60" Width="300" Height="17" Property="WIX_VERSIONS" />
    <Control Id="ButtonMain" Type="PushButton" X="320" Y="60" Width="40" Height="17" Text="Show">
      <Publish Property="COMBOVALUEFORMATTED" Order="1"  Value="You've chosen the [WIX_VERSIONS] version of the toolset" />
    </Control>
    <Control Id="LabelMain" Type="Text" X="10" Y="80" Width="360" Height="17" Property="COMBOVALUEFORMATTED" Text="[COMBOVALUEFORMATTED]" />

  </Dialog>
</UI>


试试这个解决方案:

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />

    <Feature Id="ProductFeature" Title="SetupProjectComboTest" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
    </Feature>

<UI>
  <UIRef Id="WixUI_FeatureTree" />
  <ComboBox Property="WIX_VERSIONS">
    <ListItem Value="Windows Installer XML 3.0" />
    <ListItem Value="Windows Installer XML 3.5" />
    <ListItem Value="Windows Installer XML 3.6" />
  </ComboBox>
  <Dialog Id="MyCustomDlg"  Width="500" Height="260">
    <Control Id="ComboBoxMain" Type="ComboBox" X="10" Y="60" Width="300" Height="17" Property="WIX_VERSIONS" />
    <Control Id="ButtonMain" Type="PushButton" X="320" Y="60" Width="40" Height="17" Text="Show">
      <Publish Property="COMBOVALUEFORMATTED" Order="1"  Value="You've chosen the [WIX_VERSIONS] version of the toolset" />
    </Control>
    <Control Id="LabelMain" Type="Text" X="10" Y="80" Width="360" Height="17" Property="COMBOVALUEFORMATTED" Text="[COMBOVALUEFORMATTED]" />

  </Dialog>
</UI>
<Control Id="ComboBoxMain" Type="ComboBox" X="10" Y="60" Width="300" Height="17" Property="WIX_VERSIONS" >
    <ComboBox Property="WIX_VERSIONS">
        <ListItem Value="Windows Installer XML 3.0" />
        <ListItem Value="Windows Installer XML 3.5" />
        <ListItem Value="Windows Installer XML 3.6" />
    </ComboBox>
</Control>


您是否知道,是否有从自定义操作填充值的选项?我想从服务器获取选项这可能是自定义项目加载器的一个解决方案:如果您还放置了一个默认选中的条目,那么这只是一个提示