ListView图标图像不清晰的解决方法

其实不清晰的缘由是ListView.LargeImageList的图像深度不高,默认的是8bit,因此解决的方法就是:c#

                    filesList.LargeImageList = new ImageList();
                    //修正图片不清晰的BUG
                    //默认是8bit
                    filesList.LargeImageList.ColorDepth = ColorDepth.Depth32Bit;
                    filesList.LargeImageList.ImageSize = new Size(128, 150);

ImageList.ColorDepth 属性提示为:获取图像列表的颜色深度。是误导咱们,觉得是只读的,正确的应该是:“获取或设置图像列表的颜色深度”。从C#的语法定义中能够发现。spa

C#定义:public ColorDepth ColorDepth { get; set; }
相关文章
相关标签/搜索