Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要通过值转换器获取图像的路径。但是我找不到任何使用没有绑定的值转换器的例子。
我希望按照以下方式做一些事情:
<Image source="{Value=Image1, Converter={ImageConverter}}" />
然后图像转换器将检查图像文件夹并返回正确的文件路径。
为什么不直接使用Binding这样的:
Binding
<Image Source="{Binding ., Converter={StaticResource ImageConverter}, ConverterParameter=Image1}"/>
这还不够吗?