?
Solved

Change image source on button click

Posted on 2010-11-27
5
Medium Priority
?
958 Views
Last Modified: 2012-05-10
Hi,

I need to change the source of an image on button click.

This is the code I have typed but the error I am getting is

"Value of type string cannot be converted into 'system.windows.media.imagesource'
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
            Dim ImageURI As String = ("/MoviesOnTheGo;component/DueDate.png")
            Image_Poster.Source = ImageURI
        End Sub

Open in new window

0
Comment
Question by:Trying_to_Learn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Expert Comment

by:JOHNFROG
ID: 34223961
try using

Image_Poster.imageURL

instead of

Image_Poster.source
0
 

Author Comment

by:Trying_to_Learn
ID: 34223978
Image_Poster.imageURL  Does not exist
the only property available in image is ImageFailedEvent
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 34233530
0
 

Author Closing Comment

by:Trying_to_Learn
ID: 34248378
Thanks!
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34248409
Glad to help :-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question