C# Class ZForge.Controls.XPTable.Renderers.ImageCellRenderer

A CellRenderer that draws Cell contents as Images
Inheritance: CellRenderer
Mostrar archivo Open project: zhuangyy/Motion

Public Methods

Method Description
ImageCellRenderer ( ) : System

Initializes a new instance of the ImageCellRenderer class with default settings

OnPaintCell ( PaintCellEventArgs e ) : void

Raises the PaintCell event

Protected Methods

Method Description
CalcImageRect ( Image image, ImageSizeMode sizeMode, RowAlignment rowAlignment, ColumnAlignment columnAlignment ) : Rectangle

Gets the Rectangle that specifies the Size and Location of the Image contained in the current Cell

DrawImage ( Graphics g, Image image, Rectangle imageRect, bool scaled, bool enabled ) : void

Draws the Image contained in the Cell

OnPaint ( PaintCellEventArgs e ) : void

Raises the Paint event

Method Details

CalcImageRect() protected method

Gets the Rectangle that specifies the Size and Location of the Image contained in the current Cell
protected CalcImageRect ( Image image, ImageSizeMode sizeMode, RowAlignment rowAlignment, ColumnAlignment columnAlignment ) : Rectangle
image Image The Image to be drawn
sizeMode ImageSizeMode An ImageSizeMode that specifies how the /// specified Image is scaled
rowAlignment RowAlignment The alignment of the current Cell's row
columnAlignment ColumnAlignment The alignment of the current Cell's Column
return System.Drawing.Rectangle

DrawImage() protected method

Draws the Image contained in the Cell
protected DrawImage ( Graphics g, Image image, Rectangle imageRect, bool scaled, bool enabled ) : void
g System.Drawing.Graphics The Graphics used to paint the Image
image Image The Image to be drawn
imageRect System.Drawing.Rectangle A rectangle that specifies the Size and /// Location of the Image
scaled bool Specifies whether the image is to be scaled
enabled bool Specifies whether the Image should be drawn /// in an enabled state
return void

ImageCellRenderer() public method

Initializes a new instance of the ImageCellRenderer class with default settings
public ImageCellRenderer ( ) : System
return System

OnPaint() protected method

Raises the Paint event
protected OnPaint ( PaintCellEventArgs e ) : void
e ZForge.Controls.XPTable.Events.PaintCellEventArgs A PaintCellEventArgs that contains the event data
return void

OnPaintCell() public method

Raises the PaintCell event
public OnPaintCell ( PaintCellEventArgs e ) : void
e ZForge.Controls.XPTable.Events.PaintCellEventArgs A PaintCellEventArgs that contains the event data
return void