Syntax to link to Image

1 Answer 12 Views
PictureBox
Reese
Top achievements
Rank 1
Reese asked on 01 May 2025, 02:15 AM
I think I want to do something simple.  I just want to link PictureBox image to a file I uploaded into my Project in Visual Studio.  See screenshot below.

What is the syntax I should use in a UserFunction to link the value of the PictureBox to the image located in the directory indicated below.

1 Answer, 1 is accepted

Sort by
0
Ivet
Telerik team
answered on 05 May 2025, 10:42 AM

Hello, Reese,

I answered your question in the private ticket conversation. However, I will repeat my answer here, as it may also be helpful for other users in our Q&A forum. 

The PictureBox report item is used to display images on a report. Its value can be an expression that contains binary image data, or it can be a URI (local path or URL). When a Value property is assigned a string that is not an expression (doesn't start with "="), the value is assumed to be a URI.

To link a PictureBox image to a file, you need to click on the PictureBox's Value and select the image or provide it as a path. For this purpose, you don't need a User function.

Regarding the last question, the property you set for the image depends on how you plan to use it.

  • You can use Content if you want the image to be part of the project output and accessible as a file.
  • The Resource property you can use if you want the image to be embedded in the assembly and accessed as a resource. 
  • The Embedded Resource you can use if you want the image to be embedded in the assembly, but accessed via a stream.

If you need further assistance with this issue, I recommend using the private ticket instead, as the response time there is 24 hours.

Regards,
Ivet
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
PictureBox
Asked by
Reese
Top achievements
Rank 1
Answers by
Ivet
Telerik team
Share this question
or