I have a column of datatype bitmap. the value is composed of a set of icons merged into an image side by side which can vary in numbers. My problem is that when the column is resized the images shrink to fit to the point where no images are visible. How can I prevent this from hapenning? I'd like the image to be truncated instead of resized, only show what fit's in the cell and possibly have a "..." or similar indicator at the end to indicate that not all icons are shown.
I don't think there's any way to do this automatically. You can probably use a CreationFilter to control the size of the UIElements in the cell, though. If you are going to try that, I recommend that you get the Infragistics UIElementViewer Utility. It's a big help in working with UIElements.
This doesn'tdo the ellipsis like you wanted, but it seems to work pretty well:
public class MyCreationFilter : IUIElementCreationFilter { #region IUIElementCreationFilter Members public void AfterCreateChildElements(UIElement parent) { if (parent is EditorWithTextUIElement) { ImageUIElement imageUIElement = parent.GetDescendant(typeof(ImageUIElement)) as ImageUIElement; if (imageUIElement != null) { imageUIElement.Rect = new Rectangle( imageUIElement.Rect.X, imageUIElement.Rect.Y, imageUIElement.Image.Width, imageUIElement.Rect.Height); } } } public bool BeforeCreateChildElements(UIElement parent) { return false; } #endregion }