【发布时间】:2021-05-22 10:29:24
【问题描述】:
我想从我的可执行位置下的目录加载图像。
<ImageBrush x:Key="WindowBackground" ImageSource="./backgrounds/Zenitsu.png" Stretch="UniformToFill"/>
我曾尝试使用./backgrounds/ 或\backgrounds\,但两者似乎都直接在项目中查找结果,而不是在可执行文件的位置。
我的输出结构是这样的:
Main.exe
----backgrounds
--------Zenitsu.png
【问题讨论】:
标签: c# wpf xaml imagesource imagebrush