[]
        
(Showing Draft Content)

C1.Framework.Element.Measure

Measure Method

Measure(Graphics, object)

Provides the size, in pixels, of the specified content drawn on the specified Graphics surface.

Declaration
public Size Measure(Graphics g, object value)
Parameters
Type Name Description
Graphics g

The Graphics object to use for measuring.

object value

The content to measure.

Returns
Type Description
Size

The desired Size, in pixels, of the content drawn in a single line with the current style settings in the specified device context.

Measure(Style, Graphics, object)

Provides the size, in pixels, of the specified content drawn on the specified Graphics surface with the specified style.

Declaration
public Size Measure(Style s, Graphics g, object value)
Parameters
Type Name Description
Style s

The Style object to use.

Graphics g

The Graphics object to use for measuring.

object value

The content to measure.

Returns
Type Description
Size

The desired Size, in pixels, of the content drawn in a single line with the specified style settings in the specified device context.

Measure(Graphics, object, int)

Provides the size, in pixels, of the specified content drawn on the specified Graphics surface within the rectangle of the specified width.

Declaration
public Size Measure(Graphics g, object value, int width)
Parameters
Type Name Description
Graphics g

The Graphics object to use for measuring.

object value

The content to measure.

int width

The available width.

Returns
Type Description
Size

The desired Size, in pixels, of the content drawn in within the rectangle of the specified width with the current style settings in the specified device context.

Measure(Style, Graphics, object, int)

Provides the size, in pixels, of the specified content drawn on the specified Graphics surface within the rectangle of the specified width with the specified style settings.

Declaration
public Size Measure(Style s, Graphics g, object value, int width)
Parameters
Type Name Description
Style s

The Style object to use.

Graphics g

The Graphics object to use for measuring.

object value

The content to measure.

int width

The available width.

Returns
Type Description
Size

The desired Size, in pixels, of the content drawn in within the rectangle of the specified width with the specified style settings in the specified device context.