Reputation:
I need to get the path of an image through a value converter. However I can't find any examples of using a value converter without binding.
I would be looking to do something along these lines:
<Image source="{Value=Image1, Converter={ImageConverter}}" />
The image converter will then go check an image folder and return the correct file path.
Upvotes: 3
Views: 2978
Reputation: 178660
Why not just use a Binding
like this:
<Image Source="{Binding ., Converter={StaticResource ImageConverter}, ConverterParameter=Image1}"/>
Won't that suffice?
Upvotes: 7