Picture Box with embedded resources

4 posts, 0 answers
  1. John
    John avatar
    10 posts
    Member since:
    Feb 2011

    Posted 02 Mar 2011 Link to this post

    I have images in my project whose build action are set to Resource.  On a WPF form i can use relative paths to access the images as they are embedded in the resources.dll for the project.  When i try to bind a picture box to the relative path of the image, it gives file not found as it builds the path as though it is a physical path.  How can you bind a picture box to an image whose build action is resource?
  2. Chris Gillies
    Chris Gillies avatar
    384 posts
    Member since:
    May 2006

    Posted 08 Mar 2011 Link to this post

    You can create User Functions that would return the correct path from the resources.

    Cheers!
  3. DevCraft banner
  4. John
    John avatar
    10 posts
    Member since:
    Feb 2011

    Posted 08 Mar 2011 Link to this post

    This answer doesn't really answer the question.  Sure, i could use a User Function, but what should the code within that function do?  Also, i can get the "path".  The problem is, the path that is built thinks it is a physical file on the system.  In reality the file is in the Resources.dll for the project.  WPF can use the relative path and it knows that the file is in the Resources.dll file and the relative path within that file where to find the path.  I can't seem to get this to work with the Telerik reporting picture box.
  5. Chris Rathermel
    Chris Rathermel avatar
    28 posts
    Member since:
    Dec 2006

    Posted 02 Nov 2011 Link to this post

    John,

    Did you get this to work? 
Back to Top