1
Vote

Could the ImageCell keep the aspect ratio?

description

This is a great control. But there are something bad when we create an application on it and fill the image in cells. The image will fill all of the space in the cell.

I change the code of the CellType.cs like this:

if (Image != null)
{
dc.Graphics.DrawImage(Image, new Rectangle(0, 0, Image.Width, Image.Height));
}

Maybe there are more params like anchor, scale could be added to ImageCell. Thanks.

comments

unvell wrote May 23, 2014 at 2:39 PM

Nice changes! Let me add a property which allows to choose a method to show an image, such as Stretch, Center, Zoom, Scale or Normal.

This changes will be released in the next 0.8.6 version.

unvell wrote May 26, 2014 at 8:31 AM

Add ViewMode property for ImageCell, and support to change image position by setting cell horizontal/vertical alignment.

Documentation has been updated:
https://reogrid.codeplex.com/wikipage?title=Built-in%20Cell%20Types

(Image sector)