Click or drag to resize
OGPen Class
This class represents how a grid cell border is drawn.
Inheritance Hierarchy
SystemObject
  Stingray.GridOGPen

Namespace: Stingray.Grid
Assembly: Stingray.GridUtils (in Stingray.GridUtils.dll) Version: 14.0.0.0
Syntax
[SerializableAttribute]
[TypeConverterAttribute(typeof(PenConverter))]
public class OGPen : ICloneable, ISerializable

The OGPen type exposes the following members.

Constructors
  NameDescription
Public methodOGPen
Initializes a new OGPen object.
Public methodOGPen(OGPen)
Initializes a new OGPen object from another one.
Protected methodOGPen(SerializationInfo, StreamingContext)
Internal.
Public methodOGPen(BorderDashStyle, Color, Byte)
Initializes a new OGPen object using a specified border dash style, color, and weight.
Top
Methods
  NameDescription
Public methodClone
Creates a copy of this OGPen.
Public methodEquals
Compares two pens for equality.
(Overrides ObjectEquals(Object).)
Public methodGetHashCode
Calculates the hash code for this pen.
(Overrides ObjectGetHashCode.)
Public methodMakeGdiPlusPen
Converts this OGPen to an equivalent GDI+ Pen object.
Public methodStatic memberOGBlankPen
Creates a blank pen -- a pen that draws nothing.
Public methodStatic memberOGSolidPen
Creates a solid pen using a specified color and weight.
Top
Properties
  NameDescription
Public propertyBorderColor
Gets or sets the color of the pen (border).
Public propertyDashStyle
Gets or sets the border dash style for the pen.
Public propertyDescription
Returns a string description for this pen.
Public propertyWeight
Gets or sets the weight, or width, of the pen (border).
Top
Remarks
Cell borders are available via the Borders property on a Style object. For example, use the following C# code to set the cell borders for cell 1,1 in a grid to use solid, black borders.
GridControl1[12, 3].Style.Borders =
  new Stingray.Grid.CellBorders(
    new OGPen(BorderDashStyle.Solid, Color.Black, 1),
    new OGPen(BorderDashStyle.Solid, Color.Black, 1),
    new OGPen(BorderDashStyle.Solid, Color.Black, 1),
    new OGPen(BorderDashStyle.Solid, Color.Black, 1));
See Also