The <div> tag is only used as a starting block for entering XML created content. In the moment you cant specify the width of the block in this way, use a table instead:
Code:
private String assemblyFullPath = Application.ExecutablePath;
. . .
subItem.Content = "<div style=\"align:middlecenter\"><table width=\"100%\"><tr><td width=\"100%\"><img assemblypath=\"" + assemblyFullPath + "\" resource=\"Resources.search.ico\"></img></td></tr></table></div>";
As you can see from the code we also don't use image index. From v2.2 we have added an option to retrieve images embedded in other files: the same exe file of your application, resource dlls etc. In this case we are using the same application exe file to store images. In order to retrieve an image, you only need to set the
assemblypath (the path of resource file) and the name of the
resource.
There are also other ways to show images in subitems, for example by setting the ContentType of the specified column to Image. In this case all subitems for this column will show only images. For this case the Image or ImageIndex property for subitems is used. The alignment is set from ColumnFormatStyle.ContentAlign property.