Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 760
  • Last Modified:

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.
0
huangs3
Asked:
huangs3
1 Solution
 
Anil GolamariCommented:
http://www.xdevsoftware.com/blog/post/Dynamically-Loading-Images-in-SilverLight-10-using-C.aspx

http://forums.silverlight.net/forums/p/761/1511.aspx

Hope these provide you some information on dynamically loading images in silverlight.

Good Luck.
0
 
huangs3Author Commented:
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

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now