I’ve created a user control in a WiseJ class library. This works fine, apart from when the user control requires image resources from the library.
I can’t really use the ImageSource property in a library, because any images in the library seem to go into \bin and therefore the paths are wrong.
(I can however use the Image property in a library, because it ends up in the .resx and everything is fine)
It’s a bit confusing, as in the designer using the ImageSource property works fine, but not at runtime.
Q) So I have a work-around, but should ImageSource property in a Library control be able to access images from the Library control?
The ImageSource reads any URL (it’s the src attribute of the img tag or the url in a css sheet). Can be a URL to an external image or to an image deployed on your server.
If the image is not available to the web server then it cannot be downloaded by the browser. Wisej allow the easy use of embedded resources as images using the resource.wx handler. See the section Embedded Resource URL: https://wisej.com/docs/2.0/html/EmbeddedResources.htm
Thank you Luca, the resource.wx approach works perfectly! (thanks for the explanation)
Regards,
Mark