C#的PropertyGrid中的ImageList [英] ImageList in PropertyGrid of C#

查看:268
本文介绍了C#的PropertyGrid中的ImageList的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在propertygrid中添加一个图像列表,用户可以选择一个图像来设置Bitmap Property.But当我将一个字段声明为Image时,它呈现的是一个带有一些文本的小图像(左) 。如何隐藏文本并调整图像大小?

I want add a list of images in propertygrid,the user can pick one of the image to set Bitmap Property.But when I declare a field as Image ,it presents to be a small image(left) with some text(right).How can i hide the text and resize the image?

推荐答案

这意味着您希望以线性度量将图像拉伸约100%。图像列表通常包含非常小的图像。当在放大方向上重新采样时,所有图像都表现不佳,如果源图像很小,结果是绝对不可接受的,实际上,即使缩小尺寸也是如此。我只是没有足够的信息,以获得任何可接受的结果。



因此,你需要准备两个版本的图像:文本和没有文本。替换另一个,而不是尝试进行缩放。



-SA
It means that you want to stretch the image by some 100% in linear measure. Image lists usually contains very small images. All images behave badly when re-sampled in the direction of enlargement, and the results are absolutely unacceptable if the source image is small, actually, often even if you reduce the size. I just don''t have enough information, to get any acceptable results.

Therefore, you need to have to prepare two versions of the image: with text and without text. Replace one with another, instead of trying to do the zoom.

—SA


这篇关于C#的PropertyGrid中的ImageList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆