locked
Show images in current project in list view RRS feed

Answers

  • Hi Shang Xinli,

    You can do it two ways:

     

    It is easy to set the src attribute from your project like this:
    
    
    <img src="/images/smalllogo.png" />
    
    If you wish to do if from code you can do something like this:
    
    
    function clickFunc() {
    
     
    
    myImg
    .src = "ms-wwa:///images/storelogo.png";
    
     
    
    
    
    
    }
    
    

    -Jeff

     


    Jeff Sanders (MSFT)
    Monday, December 19, 2011 8:54 PM
    Moderator

All replies

  • Shang Xinli,

    Did you have a question or did you post this by mistake?

    -Jeff


    Jeff Sanders (MSFT)
    Monday, December 19, 2011 1:49 PM
    Moderator
  • I have a question posted but don't know why it doesn't show up. OK, My question is I learned from MSDN that and I can use fileopenpicker() to open an image file and then new Image() with the opened file as source. But what if my image file is build in to my current project? How do I set the source of the image? Can you provide the sample file? This is using Java script.

    I am new to this..


    shang xinli
    Monday, December 19, 2011 4:20 PM
  • Hi Shang Xinli,

    You can do it two ways:

     

    It is easy to set the src attribute from your project like this:
    
    
    <img src="/images/smalllogo.png" />
    
    If you wish to do if from code you can do something like this:
    
    
    function clickFunc() {
    
     
    
    myImg
    .src = "ms-wwa:///images/storelogo.png";
    
     
    
    
    
    
    }
    
    

    -Jeff

     


    Jeff Sanders (MSFT)
    Monday, December 19, 2011 8:54 PM
    Moderator