在Managed Burn BootstrapperApplication中包含映像 [英] Include Image in Managed Burn BootstrapperApplication

查看:129
本文介绍了在Managed Burn BootstrapperApplication中包含映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Burn和自定义引导程序的wix进行安装.一切正常,但是我无法在应用程序UI中添加简单的图像.

I'm working on an installer with wix using Burn and a custom bootstrapper application. Everything works fine, but i fail to include a simple image into my application UI.

我将图像包含在我的UI中,如下所示:

I include the Image into my UI like this:

<Image Source="logo.jpg" Height="100" HorizontalAlignment="Center"  Margin="0,0,0,20" VerticalAlignment="Center" Width="250"/>

它在设计器中显示正常.我将界面缩小为图片,以排除其他可能的错误.

It shows normal in the designer. I reduced the interface to nothing but the image to exclude other possible errors.

我还将图像作为捆绑中的有效载荷添加了

I also added the Image as a payload in the bundle

<Payload SourceFile="..\BootstrapperApplication\logo.jpg"/>

如果我启动安装程序,该文件将显示在安装的temp文件夹中.

If i start the installer the file appears in the temp folder of the installation.

我尝试了不同的方法,例如添加作为静态资源,更改了图像的构建动作,但无法弄清楚如何正确处理.

I tried different approaches like adding is as a static ressource, changing the build actions for the image but cant figure out how to do it right.

推荐答案

您可以查看 WixBA源代码,以了解WiX安装程序是如何做到的.似乎将图像嵌入为资源:

You can look at the WixBA source code to see how the WiX installer does it. It seems to embed the images as resources:

XAML:

<Image Grid.Row="0" Grid.Column="2" Source="resources\legal.png"/>

CSProj:

<ItemGroup>
  <Resource Include="Resources\exit.png" />
  <Resource Include="Resources\gear.png" />
  <Resource Include="Resources\legal.png" />
  <Resource Include="Resources\news.png" />
  <Resource Include="Resources\wrench.png" />
</ItemGroup>

这篇关于在Managed Burn BootstrapperApplication中包含映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆