Dynamically Loading Images in SilverLight 3.0


  • Hi, could someone please write a "simple" instructions on how to dynamically load (do not know the names or number of files) from your images and display them in the application? Thanks :o)
    úterý 7. prosince 2010 17:46


  • Hi, you can set your images sources from the code by using following code:

    myImage.Source = new BitmapImage(new Uri("images/myImage.jpg", UriKind.Relative));

    If you want to add new images to the screen dynamically, you have to add new Image() class instances to the Children collection of containing element, ie. Canvas.


    Robert Haken, Microsoft MVP ASP/ASP.NET, HAVIT, s.r.o.,,
    úterý 29. března 2011 20:22