简体   繁体   English

WPF C# 图像和文件集成到应用程序中

[英]WPF C# image and file inegration into application

嗨,我正在开发一个 WPF c# 项目,并希望附加一个文本文件和集成到其中的图像文件,以便如果我将可执行文件导出到任何其他 PC,它将轻松运行...

you are thinking about this in the wrong way, Visual Studio doesn't manage installation on Client machines it only handles building the code for you to run, the thing that manages the installation is the installer您正在以错误的方式考虑这个问题,Visual Studio 不管理客户端计算机上的安装,它只处理构建供您运行的代码,管理安装的是安装程序

if you want to use a publish installer like click once then you can use Visual Studio to set the publication rules (see https://msdn.microsoft.com/en-us/library/142dbbz4%28v=vs.90%29.aspx ), otherwise you actually need to create an installer (see https://msdn.microsoft.com/en-us/library/gg513936.aspx )如果您想使用像 click once 这样的发布安装程序,那么您可以使用 Visual Studio 来设置发布规则(请参阅https://msdn.microsoft.com/en-us/library/142dbbz4%28v=vs.90%29。 aspx ),否则您实际上需要创建一个安装程序(请参阅https://msdn.microsoft.com/en-us/library/gg513936.aspx

EDIT: If i'm misunderstanding your question which i took as how do you get your resourced files to be on the client machine with the exe file, if your question is how to Embed thee resource in the first place then How to refer to Embedded Resources from XAML?编辑:如果我误解了您的问题,我认为您如何将资源文件与 exe 文件一起放在客户端计算机上,如果您的问题是首先如何嵌入资源,那么如何引用嵌入式来自 XAML 的资源? provides a very good answer提供了一个很好的答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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