I am creating a map where I need to show a photo from a SQL database table when the user hovers over the map feature. I am able to show the text fields without a problem. The code section I have looks like this??? .... <TextBlock Text="{Binding [Name]}" FontWeight="Bold"/> <TextBlock Text="{Binding [Address]}" /> <Image Stretch="None" Source="{Binding [Picture]}" /> .... Is there a converter I need to use to interpret the information from SQL for that field? If so, what is it and how do I implement it?
What field type is Picture? Is it a string URL? Image Source property expects a BitmapImage. So if you are to write your converter, you need to convert string to BitmapImage
BitmapImage bmp = new BitmapImage(new Uri(stringUrl, UriKind.Relative));
The field type is "Raster", which allows me to load the picture directly into the field during an edit session. Would the image path be easier to work with in this case?
So, If I wanted the contents of a raster field to display in a map tip, would i have to read the contents out, convert it and bind it to an image element ?