In List View, while displaying the images for the various files/folders, sometimes we face the problem that the alpha blended area of the image is not displayed properly with the default configuration of the list view. So to show the image with the correct display, I've found that if we set the ColorDepth of the image list (to be used to store the images to be shown in list view) to appropriate values, it provides the results as desired. So if smallImgLst and largeImgLst are the two image lists used for list view then if we need two views of the list i.e. Small images(16x16) and Large imges(32x32) then we can set the values as below:
smallImgLst.ColorDepth=ColorDepth.Depth32Bit
largeImgLst.ColorDepth=ColorDepth.Depth32Bit
smallImgLst.ImageSize=New System.Drawing.Size(16,16)
largeImgLst.ImageSize=New System.Drawing.Size(32,32)
If there are some other tips to resolve such kind of issue then comments are invited for discussion.
No comments:
Post a Comment