Hello,
I currently have code that sets the image in a cell depending conditions that are evaluated in the row_initialise() event. This has been working fine since the displayed data is a date and the image is a small right alighed icon. The data has now changed to possibly (not always) have a time appended on the end which now causes the displayed date to ellipse against the image. I do not want to alter the width of the cell so the ideal scenario is to allow the text to partially write over the image.
This can be done be pushing the image to the backgound layer but there currently seems nothing native to right-align a background image, only centre or stretch etc.
Can right alighment of the background image be achieved with a draw filter or such-like?
thanks
Hi Andy,
Yes, you could use a DrawFilter to draw the image into the cell yourself in the AfterDrawBackground phase. If you are going to try that, I recommend that you get the Infragistics UIElementViewer Utility. It's a big help when working with UIElements.
Another option might be to create the image on the fly. You could create an image that is the same size as the cell and then draw your image onto the right side of the image and use that as your ImageBackground. You would probably want to cache the images and re-use them whenever possible.