我有一个资源中的图片,我想根据输入文本字符串显示它,我正在使用转换器,如何实现这一点,因为它没有显示在我的应用程序中。
在我的转换器 EstateCodetoEstateImageConverter 中,我有:
return Resources.Customer1EstateHeaderImage;
在我的XAML中,我有以下代码:
<Image Source="{Binding EstateSheet.EstateCode, Converter={StaticResource EstateCodetoEstateImageConverter1}}" Stretch="Fill" Width="189" Height="112" />
我的理解是,绑定到源需要文件路径名而不是实际资源,我该怎么做呢?