BrightIdeasSoftware.ObjectListView.SetNativeBackgroundImage C# (CSharp) Method

SetNativeBackgroundImage() public method

Set the given image to be background of the ListView so that it appears at the given percentage offsets within the list.

This has the same limitations as described in SetNativeBackgroundWatermark. Make sure those limitations are understood before using the method.

This is very similar to setting the System.Windows.Forms.Control.BackgroundImage property of the standard .NET ListView, except that the standard BackgroundImage does not handle images with transparent areas properly -- it renders transparent areas as black. This method does not have that problem.

Setting this clears any background watermark.

public SetNativeBackgroundImage ( Image image, int xOffset, int yOffset ) : void
image Image The image to be drawn. If null, any existing image will be removed.
xOffset int The horizontal percentage where the image will be placed. 0 is absolute left, 100 is absolute right.
yOffset int The vertical percentage where the image will be placed.
return void
        public void SetNativeBackgroundImage(Image image, int xOffset, int yOffset)
        {
            NativeMethods.SetBackgroundImage(this, image, false, false, xOffset, yOffset);
        }
ObjectListView