I adjusted the following properties of ListView:
ImageSize = new Size(100,100);
ItemSize = new Size(100,100);
Spacing = new Size(0,0);
But there some border (space between blue selection frame and image) exists. And
How can I change it?
Thanks!
I decided to use Icon view in this case. I made filter but again faced difficulties. Can I hide text name under icon and make selection border around it (now it's just around text)
There is no way to change that through the public object model; this view was based on the pre-Vista WIndows Explorer which also did not provide any way to change that. If you like you can submit a feature request for the ability to do this.
Note that you can work around this limitation in the meantime using the IUIElementCreationFilter interface (assign an instance of this class to the control's CreationFilter property):
#region ThumbnailCreationFilterpublic class ThumbnailCreationFilter : IUIElementCreationFilter{ UltraListView listView = null; public ThumbnailCreationFilter( UltraListView listView ) { this.listView = listView; }
#region IUIElementCreationFilter Members
void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent) { if ( parent is UltraListViewIconicImageAreaUIElement ) { ImageUIElement imageElement = parent.GetDescendant( typeof(ImageUIElement) ) as ImageUIElement; if ( imageElement != null ) { Rectangle rect = parent.Rect; rect.Inflate( -4, -4 ); imageElement.Rect = rect; imageElement.Scaled = true; } } }
bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent) { return false; }
#endregion}#endregion ThumbnailCreationFilter