i'm having a custom object with Picture as a string (file name only) and i want to display.
the problem is that the image is stored in "images" directory of the project so the full path is now "images/{image name}"
how can i bind it correctly ?
i can do it easily with converter i guess, but is there any way to avoid it like:
<Image Source="{Binding Path=FullPath+"/"+Pict开发者_Go百科ure}">
?
You could bind to an aggregated property in your ViewModel and then put whatever path you like into that. That way the ViewModel becomes the 'converter'.
精彩评论