locked
relative path for Image.source RRS feed

  • Question

  • Hi,

       I have a silverlight ria application.

     

    I have all my Login control xaml files in applicationRootFolder->Views->Login folder.

    and all my images are in applicationRootFolder->Images 

    So tried to access the images from the login xamls using 

     

    Image x:Name="pendingImage" Source="..\..\Images\pending.png" Height="16" Width="16" />

     

    This relative path is not working.  Need some help.

    similar to this, all my controls use images, and I would like to keep all the images in one folder.


    Thanks.

    Thursday, September 2, 2010 8:49 PM

Answers

  • Just had to add the images as resouces to the project.

     

    Thanks for the response though. 

    Friday, September 3, 2010 3:14 PM

All replies

  • Hi,

    please give this path to images.

    Source="..\Images\pending.png"



    Thursday, September 2, 2010 11:58 PM
  • Please ignore this post.

    Friday, September 3, 2010 12:03 AM
  • Relative path should be given with respect to you XAP file and hence its always better to have your Images folder in your ClientBin and then give a relative path.

    Friday, September 3, 2010 12:16 AM
  • Just had to add the images as resouces to the project.

     

    Thanks for the response though. 

    Friday, September 3, 2010 3:14 PM