Class ImageListView.ImageListViewRenderer
Represents an overridable class for image list view renderers.
Inheritance
Implements
Namespace: Manina.Windows.Forms
Assembly: ImageListView.dll
Syntax
public class ImageListViewRenderer : IDisposable
Constructors
| Improve this Doc View SourceImageListViewRenderer()
Initializes a new instance of the ImageListViewRenderer class.
Declaration
public ImageListViewRenderer()
Properties
| Improve this Doc View SourceCanApplyColors
Gets a value indicating whether this renderer can apply custom colors.
Declaration
public virtual bool CanApplyColors { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ClientBounds
Gets the rectangle bounding the client area of the control without the scroll bars.
Declaration
public Rectangle ClientBounds { get; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Rectangle |
Clip
Gets or sets whether the graphics is clipped to the bounds of drawing elements.
Declaration
public bool Clip { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ColumnHeaderBounds
Gets the rectangle bounding the column headers.
Declaration
public Rectangle ColumnHeaderBounds { get; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Rectangle |
ImageListView
Gets the ImageListView owning this item.
Declaration
public ImageListView ImageListView { get; }
Property Value
| Type | Description |
|---|---|
| ImageListView |
ItemAreaBounds
Gets the rectangle bounding the item display area.
Declaration
public Rectangle ItemAreaBounds { get; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Rectangle |
ItemDrawOrder
Gets or sets the order by which items are drawn.
Declaration
public ItemDrawOrder ItemDrawOrder { get; set; }
Property Value
| Type | Description |
|---|---|
| ItemDrawOrder |
ItemsDrawnFirst
Gets or sets whether items are drawn before of after headers and the gallery images.
Declaration
public bool ItemsDrawnFirst { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
PreferredColors
Gets a list of color themes preferred by this renderer.
Declaration
public virtual ImageListViewColor[] PreferredColors { get; }
Property Value
| Type | Description |
|---|---|
| ImageListViewColor[] |
Methods
| Improve this Doc View SourceDispose()
Releases managed resources.
Declaration
public virtual void Dispose()
DrawBackground(Graphics, Rectangle)
Draws the background of the control.
Declaration
public virtual void DrawBackground(Graphics g, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| System.Drawing.Rectangle | bounds | The client coordinates of the item area. |
DrawBorder(Graphics, Rectangle)
Draws the border of the control.
Declaration
public virtual void DrawBorder(Graphics g, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| System.Drawing.Rectangle | bounds | The coordinates of the border. |
DrawCheckBox(Graphics, ImageListViewItem, Rectangle)
Draws the checkbox icon for the specified item on the given graphics.
Declaration
public virtual void DrawCheckBox(Graphics g, ImageListViewItem item, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| ImageListViewItem | item | The ImageListViewItem to draw. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of the checkbox in client coordinates. |
DrawColumnExtender(Graphics, Rectangle)
Draws the extender after the last column.
Declaration
public virtual void DrawColumnExtender(Graphics g, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of extender column in client coordinates. |
DrawColumnHeader(Graphics, ImageListView.ImageListViewColumnHeader, ColumnState, Rectangle)
Draws the column headers.
Declaration
public virtual void DrawColumnHeader(Graphics g, ImageListView.ImageListViewColumnHeader column, ColumnState state, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| ImageListView.ImageListViewColumnHeader | column | The ImageListViewColumnHeader to draw. |
| ColumnState | state | The current view state of column. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of column in client coordinates. |
DrawFileIcon(Graphics, ImageListViewItem, Rectangle)
Draws the file icon for the specified item on the given graphics.
Declaration
public virtual void DrawFileIcon(Graphics g, ImageListViewItem item, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| ImageListViewItem | item | The ImageListViewItem to draw. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of the file icon in client coordinates. |
DrawGalleryImage(Graphics, ImageListViewItem, Image, Rectangle)
Draws the large preview image of the focused item in Gallery mode.
Declaration
public virtual void DrawGalleryImage(Graphics g, ImageListViewItem item, Image image, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| ImageListViewItem | item | The ImageListViewItem to draw. |
| System.Drawing.Image | image | The image to draw. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of the preview area. |
DrawGroupHeader(Graphics, String, Rectangle)
Draws the group headers.
Declaration
public virtual void DrawGroupHeader(Graphics g, string name, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| System.String | name | The name of the group to draw. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of group in client coordinates. |
DrawInsertionCaret(Graphics, Rectangle)
Draws the insertion caret for drag and drop operations.
Declaration
public virtual void DrawInsertionCaret(Graphics g, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of the insertion caret. |
DrawItem(Graphics, ImageListViewItem, ItemState, Rectangle)
Draws the specified item on the given graphics.
Declaration
public virtual void DrawItem(Graphics g, ImageListViewItem item, ItemState state, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| ImageListViewItem | item | The ImageListViewItem to draw. |
| ItemState | state | The current view state of item. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of item in client coordinates. |
DrawOverlay(Graphics, Rectangle)
Draws an overlay image over the client area.
Declaration
public virtual void DrawOverlay(Graphics g, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of the client area. |
DrawPane(Graphics, ImageListViewItem, Image, Rectangle)
Draws the left pane in Pane view mode.
Declaration
public virtual void DrawPane(Graphics g, ImageListViewItem item, Image image, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| ImageListViewItem | item | The ImageListViewItem to draw. |
| System.Drawing.Image | image | The image to draw. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of the pane. |
DrawSelectionRectangle(Graphics, Rectangle)
Draws the selection rectangle.
Declaration
public virtual void DrawSelectionRectangle(Graphics g, Rectangle selection)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| System.Drawing.Rectangle | selection | The client coordinates of the selection rectangle. |
DrawSubItemItemOverlay(Graphics, ImageListViewItem, ItemState, Int32, Boolean, Rectangle)
Draws the overlay graphics for the specified sub item on the given graphics.
Declaration
public virtual void DrawSubItemItemOverlay(Graphics g, ImageListViewItem item, ItemState state, int subItemIndex, bool subItemHovered, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
| ImageListViewItem | item | The ImageListViewItem to draw. |
| ItemState | state | The current view state of item. |
| System.Int32 | subItemIndex | The index of the sub item. The index returned is the 0-based index of the column as displayed on the screen, considering column visibility and display indices. Returns -1 if the hit point is not over a sub item. |
| System.Boolean | subItemHovered | true if the mouse cursor is over the sub item; otherwise false. |
| System.Drawing.Rectangle | bounds | The bounding rectangle of the sub item in client coordinates. |
GetImageAsync(ImageListViewItem, Size)
Reads and returns the image for the given item.
Declaration
public Image GetImageAsync(ImageListViewItem item, Size size)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageListViewItem | item | The item to read. |
| System.Drawing.Size | size | The size of the requested image.. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Image | Item thumbnail of requested size. |
InitializeGraphics(Graphics)
Initializes the System.Drawing.Graphics used to draw control elements.
Declaration
public virtual void InitializeGraphics(Graphics g)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The System.Drawing.Graphics to draw on. |
MeasureColumnHeaderHeight()
Returns the height of column headers.
Declaration
public virtual int MeasureColumnHeaderHeight()
Returns
| Type | Description |
|---|---|
| System.Int32 | The height of column headers. |
MeasureGroupHeaderHeight()
Returns the height of group headers.
Declaration
public virtual int MeasureGroupHeaderHeight()
Returns
| Type | Description |
|---|---|
| System.Int32 |
MeasureItem(View)
Returns item size for the given view mode.
Declaration
public virtual Size MeasureItem(View view)
Parameters
| Type | Name | Description |
|---|---|---|
| View | view | The view mode for which the measurement should be made. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | The item size. |
MeasureItemMargin(View)
Returns the spacing between items for the given view mode.
Declaration
public virtual Size MeasureItemMargin(View view)
Parameters
| Type | Name | Description |
|---|---|---|
| View | view | The view mode for which the measurement should be made. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | The spacing between items. |
OnLayout(LayoutEventArgs)
Sets the layout of the control.
Declaration
public virtual void OnLayout(LayoutEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutEventArgs | e | A LayoutEventArgs that contains event data. |
Explicit Interface Implementations
| Improve this Doc View SourceIDisposable.Dispose()
Releases buffered graphics objects.
Declaration
void IDisposable.Dispose()