首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Wixsharp中更改横幅文本的颜色

在Wixsharp中更改横幅文本的颜色
EN

Stack Overflow用户
提问于 2017-02-21 00:20:58
回答 1查看 320关注 0票数 0

使用默认WiXUI_Minimal时,是否可以更改横幅中显示的文本的颜色,或者是否必须添加自定义对话框?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-21 16:42:00

我设法像这样解决了它。

代码语言:javascript
复制
project.BannerImage = "black_banner.jpg";
project.LocalizationFile = "default.wxs";
project.WixSourceGenerated += Project_WixSourceGenerated;

..。

代码语言:javascript
复制
private static void Project_WixSourceGenerated(XDocument document)
{
    var product = document.Select("Wix/Product");

    var ui = product.AddElement("UI");

    // Banner Title
    ui.Add(new XElement("TextStyle",
        new XAttribute("Id", "White12"),
        new XAttribute("FaceName", "Tahoma"),
        new XAttribute("Size", "12"),
        new XAttribute("Red", "255"),
        new XAttribute("Green", "255"),
        new XAttribute("Blue", "255")));

    // Banner description
    ui.Add(new XElement("TextStyle",
        new XAttribute("Id", "White8"),
        new XAttribute("FaceName", "Tahoma"),
        new XAttribute("Size", "8"),
        new XAttribute("Red", "255"),
        new XAttribute("Green", "255"),
        new XAttribute("Blue", "255")));
}

然后我将此代码添加到文件default.wxs中

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">  
  <String Id="InstallDirDlgTitle" Overridable="yes">{\White12}Destination Folder</String>
  <String Id="InstallDirDlgDescription" Overridable="yes">{\White8}Click Next to install to the default folder or click Change to choose another.</String>
  <String Id="LicenseAgreementDlgDescription" Overridable="yes">{\White8}Please read the following license agreement carefully</String>
  <String Id="LicenseAgreementDlgTitle" Overridable="yes">{\White12}End User License Agreement</String>
  <String Id="MaintenanceTypeDlgDescription" Overridable="yes">{\White8}Select the operation you whish to perform.</String>
  <String Id="MaintenanceTypeDlgTitle" Overridable="yes">{\White12}Change, repair, or remove installation</String>
  <String Id="ProgressDlgTitleInstalling" Overridable="yes">{\White12}Installing [ProductName]</String>
  <String Id="VerifyReadyDlgInstallTitle" Overridable="yes">{\White12}Ready to Install [ProductName]</String>
  <String Id="VerifyReadyDlgRepairTitle" Overridable="yes">{\White12}Ready to repair [ProductName]</String>
  <String Id="VerifyReadyDlgRemoveTitle" Overridable="yes">{\White12}Ready to remove [ProductName]</String>
</WixLocalization>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42349486

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档