[dba-VB] Silverlight Image in Listbox

Griffiths, Richard R.Griffiths at bury.gov.uk
Tue Jul 5 11:39:53 CDT 2011


Hi

this is what I do...


if (this.ImgCoverMedium.Length>0)
           this.imgCover = new
System.Windows.Media.Imaging.BitmapImage(new Uri(this.ImgCoverMedium,
UriKind.Absolute));

Where imgCover is type : System.Windows.Media.Imaging.BitmapImage
and ImgCoverMedium is the (string) path the image.

HTH

Richard



-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert Stewart
Sent: 05 July 2011 15:18
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Silverlight Image in Listbox


Question: I have a silverlight listbox control. It is bound to data in a
database, not an object.
I have the URL for an image stored in each of the records returned from
the database.
I need to display that in the list box.

< Image
     x:Name="imgPhoto"
     Height="30"
     Width="30"
     Source="{Binding Path=PhotoURL}"
/>

does not work by itself. The URL stored in the database looks something
like this: "/images/1_0.jpg"

Does anybody know how to get the image to display?



Robert L. Stewart
www.WeBeDb.com
www.DBGUIDesign.com
www.RLStewartPhotography.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com

-----------------------------------------------------------------
Why not visit our website www.bury.gov.uk
-----------------------------------------------------------------
Incoming and outgoing e-mail messages are routinely monitored for compliance
with our information security policy.
The information contained in this e-mail and any files transmitted
with it is for the intended recipient(s) alone. It may contain
confidential information that is exempt from the disclosure under
English law and may also be covered by legal,professional or other privilege.
If you are not the intended recipient, you must not copy, distribute or take any
action in reliance on it. 
If you have received this e-mail in error, please notify us immediately by using 
the reply facility on your e-mail system.
If this message is being transmitted over the Internet, be aware that it may be 
intercepted by third parties.
As a public body, the Council may be required to disclose this e-mail or any 
response to it under the Freedom of Information Act 2000 unless the information
in it is covered by one of the exemptions in the Act.  
Electronic service accepted only at legalservices at bury.gov.uk and on fax number 
0161 253 5119 .
*************************************************************





More information about the dba-VB mailing list