Label ImageSource ImageAlign not working

0
0

Hi,

When you set the ImageSource property of a Label control, the ImageAlign property does not work, it just stays centered.  However, ImageAlign does work if you set the ‘Image’ property to a JPG/PNG etc.

  • You must to post comments
0
0

That’s because svg images don’t have a size and for the Label we didn’t force the image size in the theme. Also, the layout of svg images works a bit differently in IE (used for rendering) and Chrome at runtime. We wanted to let labels use the image’s original size.

You can set the size of the image by assigning an ImageList to the Label (no need to use the  images in the image list) and set the size of the image list. You can assign the same image list to multiple labels, this way you can normalize the size of the images in multiple controls simply by setting the image size of the ImageList.

Buttons work the same way, except that their image size is limited in the themes.

/Luca

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.