I am having some binding issues, I am binding an image url path to the source of an image but it doesn't seem to be loading.
<Image Grid.Column="0" Grid.Row="0" Source="{Binding user.profilePic}"
Width="50" Height="50" Margin="5,0,0,0" />
Width="50" Height="50" Margin="5,0,0,0" />
user.profilePic holds the path to the image. Am I just doing something stupid or do i need to dig into something else?
07/10/2009 - 12:30
Couple of questions/comment:
Is this in Silverlight? I've seen issues with images loading when trying to run it locally. It won't load images unless the project is running inside an actual webserver - like an ASP test project.
Have you set the DataContext on the class holding the image?
You can only bind to properties. A lowercase variable name doesn't usually indicate a property.
07/10/2009 - 12:52
It's a property. No data context on the class.
07/10/2009 - 12:57
Nice call it works running on a web server.
05/15/2010 - 03:45
hey i want codes for image binding in asp could you help me out.
Add Comment
[language] [/language]
Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]
See here for supported languages.
Javascript must be enabled to submit anonymous comments - or you can login.