Hi, I want to be able to change a photo on a usercontrol dialog panel based on the item selected in a separate combo box. Basically, when a user selects an item from the combo box a graphic is added to a graphics layer. From there, I have been able to update all the other text boxes in the form by grabbing the attributes from specified fields for the selected graphic and using them to populate the test properties on the text boxes. For the image, I have been trying to change the source property based on the value in the attribute table for the selected graphic.I have a field (IMAGES) in the layer that contains the names of the image files.Here is the code that does not work... Dim photoName As String = selectedFeaturePolling.Attributes.Item("IMAGES")
Dim imageURLstring As String = String.Format("Torrens;component/Images/PollingPlaces/{0}'", photoName)
PollingDialog.PollingPlaceImage.Source = New BitmapImage(New Uri(imageURLstring, UriKind.Relative))
Through the use of message boxes I know that the correct file name is grabbed from the attribute table in the first line and that it is properly added into the URL string on the second line.The third line is where I get lost. I found this example online, but nothing happens when I run this code.Any help would be greatly appreciated.Thanks, Mark