Link to home
Start Free TrialLog in
Avatar of huangs3
huangs3Flag for Canada

asked on

SilverLight 4: how to dynamically change the source of an Image?

Hi Experts:

    I am making a SilverLight 4 program in which I want an image to be changed when user click a button.
    This is simple and straight forward if I am implementing desktop or ASP program: just build the bitmap with the new image URI  (hard-coded in the code) and assign the bitmap to Image.Source property.
    However, it seems non-trivial to me in SilverLight, because the application is hosted in the server but executed in the client. The client computer wouldn't have the path specified by the URI.
    Can you tell me how to make it work? If there is an example then it will be great.
    Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Anil Golamari
Anil Golamari
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of huangs3

ASKER

Hi lucky85:

    Your links are relevant. Using the key "Dynamically-Loading-Image" I got an easy to follow link
http://blogs.silverlight.net/blogs/msnow/archive/2008/06/06/dynamically-loading-and-display-images-in-beta-2.aspx