locked
Images and Resources etc..

    Question

  • Probably a very mundane question here, but I am a very strong .Net applications developer, typically for the Desktop not the metro interface.  However, I am trying to create a Metro style app (windows store app) and am having nothing but headaches in the most simplistic things.

    I understand there are "Tiles"  But these are very specific use images that are referenced by the application.  I need to create what used to be called "Resource Images".  You know the old .resx images that can be any size any shape, and the Windows.Forms.Image class would resize accordingly. 

    Now I would like to basically add a png/jpg to my application and be able (in design mode) assign the Image.Source property to this image.  I have tried to create an Images folder in the solution and included both a jpg and png formatted version of the image, but it never displays.

    Frankly, I just don't get it.  (i'm a power monger when it comes to programming, so my lack of control is infinitely frustrating).  But I must learn, and the limitations of the windows store apps are what they are.

    I have the main page, I've added a canvas and a textblock, button and an Image.  After adding the Images folder with the two images added to it, I was able to select the file directly via the XAML designer and point the Source to the file "image.png".  Technically at the moment this image.png file is just some random image I grabbed from my computer for testing/educational purposes, but eventually it may be an animation or static image provided by the client (of course all compiled in at design time no run-time loading), but regardless of the eventual source file, I want it to:

    1. Be Included in the Project (like a .Net resx image) so I can just reference it and not have to do any storage file run time loading or such.
    2. Simply assign the source to this image in the designer so I can adjust it as necessary, or possibly have the Image class process the resizing automatically like the Windows.Forms.Image used to, so as to fit the dimensions of the Image as defined on the main page of the app.

    How do I achieve this in a windows Store App?

    Thanks

    Jaeden "Sifo Dyas" al'Raec Ruiner


    "Never Trust a computer. Your brain is smarter than any micro-chip."
    PS - Don't mark answers on other people's questions. There are such things as Vacations and Holidays which may reduce timely activity, and until the person asking the question can test your answer, it is not correct just because you think it is. Marking it correct for them often stops other people from even reading the question and possibly providing the real "correct" answer.

    Friday, April 3, 2015 3:00 PM

All replies

      • Be Included in the Project (like a .Net resx image) so I can just reference it and not have to do any storage file run time loading or such.
      • Simply assign the source to this image in the designer so I can adjust it as necessary, or possibly have the Image class process the resizing automatically like the Windows.Forms.Image used to, so as to fit the dimensions of the Image as defined on the main page of the app.

      How do I achieve this in a windows Store App?

    Can you post the code project?


    Mark if helps

    Monday, April 6, 2015 9:31 AM