Set image by cell.style backgroundimage
=> the background images are not shown in the cells that are visible on start, only in the cells not visible on start, after scroll down the background images are visible
=> the positioning of the images is not working properly:
cell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
cell.Style.BackgroundImageAlign = ContentAlignment.MiddleCenter;
cell.Style.BackgroundImageLayout = ImageLayout.Zoom;
the images are always positioned at top of the cell
for reproduction of the drag drop problem, see the attached project. Column2 in the datagridview has mixed contents with text and images. DragDrop works well as long as you begin drag within a cell “outside” of the image area. As soon as you drag the image dragdrop doesn’t work anymore.
WJ-7809: Bug: Cached rows in a DGV control may lose the background image when retrieved from the cache.
WJ-7810: Enhancement: Add ImageLayout.BestFit and ImageLayout.OriginalSize.
Let me know about the drag&drop issues, I can’ reproduce that one.
Yes, I see. The problem is that the theme sets the background image at 24px 24px because of svg icons, otherwise svg icons are all quite big when using their natural dimension. The BackgroundImage property was added originally to support icons in cells. I have to see if we can override the theme without having to create a mixin under a combination of properties that makes sense.
About the other issues:
Logged both issues.
But then the ascpect ratio of the image is not properly displayed as you see in Column2, Column1 (with AllowHTML=true and a image url, but then DragDrop does not work) shows the image properly.
And the other problem with the background image not shown in the first screen, you dont’t see? Pleas have a look on the attached screeshot
Please login first to submit.