pictureEdit 可以直接绑定Image 或者 Byte Array (根据官方资料)

当我们在PictureEdit中放置一个较大图片的时候,SizeMode属性虽然设置Zoom 但还是会出现将图片容器趁的过大,从而影响下面的显示。

FileStream fs = new FileStream (fileName,FileModel.OpenOrCreate);

 

byte[] bt = new byte[fs.length];

fs.Close();

if(bt!=null)

{

Stream stream = new MemoryStream(bt);

Bitmap bmtemp = new Bitmap(stream);

Image img = new Bitmap(bmtemp, pictureEdid.With, pictureEdid.Height); //指定图片显示尺寸与控件大小一样

pictureEdid.EditValue = img;

}

相关文章:

  • 2021-08-16
  • 2022-12-23
  • 2021-12-19
  • 2021-11-25
  • 2021-05-29
  • 2021-12-08
  • 2021-10-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-07-16
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案