[SOLVED] Resource handlers

Answered Closed
0
0

In Visual WebGUI it used IconResourceHandle(“TrashCan.gif”) what is the recommended method to do the same thing?

 

Thanks,

Tim

  • You must to post comments
Best Answer
0
0

Depending on where the image is and if you want to use an embedded image or a file:

To use a file:

control.ImageSource = “TrashCan.gif”;

control.ImageSource = “Images/TrashCan.gif”;

control.ImageSource = “http://server-somewhere.com/TrashCan.gif”;

To use resources instead use the Image property as in winforms:

control.Image = Resource.TrashCan;

etc.

Basically Image works exactly like in winforms. ImageSource takes a string which can be a name in the theme, a url, or a file name in the project.

Best,

Luca

  • You must to post comments
Showing 1 result