Picture Box Image

0
0

Hi All,

I am just trying to understand why my issue is happening to better understand WiseJ.

In migrating our project from VWG, we have a Picture Box on the main page which has the company / site logo.

We set the default value in the designer and it points to {ApplicationName}.Properties.Resources.logo.

In VWG, when a customer wanted to change the logo to their own custom logo, they would simply replace the logo.png file in the Resources/Images directory.

If we do a similar thing in Wisej by replacing the logo.png file in the Resources directory.  The original logo set in the designer stays there.  Tried doing IISReset, clear cache etc but it doesnt change.

From reading the documentation, I can do it using the following :-

Option 1:-

var logoImage = Path.Combine(Wisej.Web.Application.StartupPath, “resources”, “logo.png”);

pbLogo.BackgroundImage = Image.FromFile(logoImage);

or Option 2

Embed multiple images in the resources and load from Resources internally

pbLogo.ImageSource = “resource.wx/logo_1.png”;

I am just trying to understand the mechanics or why the file change doesn’t apply.

Thanks,

Brayden.

 

 

 

 

 

  • You must to post comments
0
0

Hi Brayden,

It looks like the resource wasn’t compiled to reflect the changes.

Usually, we recommend using the ImageSource property, and to load images from a publically accessible Images folder.

You can always go with the embedded resource route as well as you discussed.

Maybe we can figure out what’s causing the issue on your end if you could send us a small reproducible test case.

Best Regards,
Alaa

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.