C# Class SourceGrid.Cells.Views.ViewBase

Inheritance: DevAge.Drawing.VisualElements.ContainerBase, IView
Mostra file Open project: zhuangyy/Motion Class Usage Examples

Public Properties

Property Type Description
DefaultAlignment DevAge.Drawing.ContentAlignment
DefaultBackColor Color
DefaultBorder DevAge.Drawing.RectangleBorder
DefaultForeColor Color
DefaultPadding DevAge.Drawing.Padding

Public Methods

Method Description
DrawCell ( CellContext cellContext, DevAge graphics, RectangleF rectangle ) : void

Draw the cell specified

GetDrawingFont ( GridVirtual grid ) : Font

Get the font of the cell, check if the current font is null and in this case return the grid font

Measure ( CellContext cellContext, Size maxLayoutArea ) : Size

Returns the minimum required size of the current cell, calculating using the current DisplayString, Image and Borders informations.

ViewBase ( ) : System

Use default setting

ViewBase ( ViewBase p_Source ) : System

Copy constructor. This method duplicate all the reference field (Image, Font, StringFormat) creating a new instance.

Protected Methods

Method Description
PrepareView ( CellContext context ) : void

Prepare the current View before drawing. Override this method for customize the specials VisualModel that you need to create. Always calls the base PrepareView.

Method Details

DrawCell() public method

Draw the cell specified
public DrawCell ( CellContext cellContext, DevAge graphics, RectangleF rectangle ) : void
cellContext CellContext
graphics DevAge Paint arguments
rectangle System.Drawing.RectangleF
return void

GetDrawingFont() public method

Get the font of the cell, check if the current font is null and in this case return the grid font
public GetDrawingFont ( GridVirtual grid ) : Font
grid GridVirtual
return System.Drawing.Font

Measure() public method

Returns the minimum required size of the current cell, calculating using the current DisplayString, Image and Borders informations.
public Measure ( CellContext cellContext, Size maxLayoutArea ) : Size
cellContext CellContext
maxLayoutArea System.Drawing.Size SizeF structure that specifies the maximum layout area for the text. If width or height are zero the value is set to a default maximum value.
return System.Drawing.Size

PrepareView() protected method

Prepare the current View before drawing. Override this method for customize the specials VisualModel that you need to create. Always calls the base PrepareView.
protected PrepareView ( CellContext context ) : void
context CellContext Current context. Cell to draw. This property is set before drawing. Only inside the PrepareView you can access this property.
return void

ViewBase() public method

Use default setting
public ViewBase ( ) : System
return System

ViewBase() public method

Copy constructor. This method duplicate all the reference field (Image, Font, StringFormat) creating a new instance.
public ViewBase ( ViewBase p_Source ) : System
p_Source ViewBase
return System

Property Details

DefaultAlignment public_oe static_oe property

public static ContentAlignment,DevAge.Drawing DefaultAlignment
return DevAge.Drawing.ContentAlignment

DefaultBackColor public_oe static_oe property

public static Color DefaultBackColor
return Color

DefaultBorder public_oe static_oe property

A default RectangleBorder instance with a 1 pixed LightGray border on bottom and right side
public static RectangleBorder,DevAge.Drawing DefaultBorder
return DevAge.Drawing.RectangleBorder

DefaultForeColor public_oe static_oe property

public static Color DefaultForeColor
return Color

DefaultPadding public_oe static_oe property

public static Padding,DevAge.Drawing DefaultPadding
return DevAge.Drawing.Padding