Class CellStyleInfo
Represents the functionalities that holds all information stored for a cell.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.WinForms.DataGrid.Styles
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public class CellStyleInfo : StyleInfoSubObjectBase, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
Constructors
CellStyleInfo()
Initializes a new instance of the CellStyleInfo class.
Declaration
public CellStyleInfo()
CellStyleInfo(StyleInfoSubObjectIdentity)
Initializes a new instance of the CellStyleInfo class.
Declaration
public CellStyleInfo(StyleInfoSubObjectIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A DataGridStyleInfoIdentity that holds the identity for this CellStyleInfo. |
CellStyleInfo(StyleInfoSubObjectIdentity, CellStyleInfoStore)
Initializes a new instance of the CellStyleInfo class.
Declaration
public CellStyleInfo(StyleInfoSubObjectIdentity identity, CellStyleInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A DataGridStyleInfoIdentity that holds the identity for this CellStyleInfo. |
CellStyleInfoStore | store | A CellStyleInfoStore that holds data for this CellStyleInfo. All changes in this style object will be saved in the CellStyleInfoStore object. |
CellStyleInfo(CellStyleInfo)
Initializes a new instance of the CellStyleInfo class.
Declaration
public CellStyleInfo(CellStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
CellStyleInfo | style | The style object that contains the original data. |
CellStyleInfo(CellStyleInfoStore)
Initializes a new instance of the CellStyleInfo class.
Declaration
public CellStyleInfo(CellStyleInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
CellStyleInfoStore | store | A CellStyleInfoStore that holds data for this CellStyleInfo. All changes in this style object will be saved in the CellStyleInfoStore object. |
Fields
Empty
Maintains the empty CellStyleInfo.
Declaration
public static readonly CellStyleInfo Empty
Field Value
Type |
---|
CellStyleInfo |
Properties
BackColor
Gets or sets a value indicating whether the BackColor of a cell instead of using Interior.
Declaration
public Color BackColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Remarks
BaseStyle
Gets or sets the base style for this style instance with default values for properties that are not initialized for this style object.
Declaration
public string BaseStyle { get; set; }
Property Value
Type |
---|
System.String |
Borders
Gets or sets Top, left, bottom, and right border settings.
Declaration
public GridBordersInfo Borders { get; set; }
Property Value
Type |
---|
GridBordersInfo |
Default
Gets a CellStyleInfo with default settings.
Declaration
public static CellStyleInfo Default { get; }
Property Value
Type |
---|
CellStyleInfo |
Font
Gets or sets the font for drawing text.
Declaration
public GridFontInfo Font { get; set; }
Property Value
Type |
---|
GridFontInfo |
HasBaseStyle
Gets a value indicating whether BaseStyle has been initialized for the current object.
Declaration
public bool HasBaseStyle { get; }
Property Value
Type |
---|
System.Boolean |
HasBorders
Gets a value indicating whether border information has been initialized for the current object.
Declaration
public bool HasBorders { get; }
Property Value
Type |
---|
System.Boolean |
HasFont
Gets a value indicating whether font information has been initialized for the current object.
Declaration
public bool HasFont { get; }
Property Value
Type |
---|
System.Boolean |
HasHorizontalAlignment
Gets a value indicating whether HorizontalAlignment has been initialized for the current object.
Declaration
public bool HasHorizontalAlignment { get; }
Property Value
Type |
---|
System.Boolean |
HasInterior
Gets a value indicating whether interior information has been initialized for the current object.
Declaration
public bool HasInterior { get; }
Property Value
Type |
---|
System.Boolean |
HasTextColor
Gets a value indicating whether text color has been initialized for the current object.
Declaration
public bool HasTextColor { get; }
Property Value
Type |
---|
System.Boolean |
HasVerticalAlignment
Gets a value indicating whether VerticalAlignment has been initialized for the current object.
Declaration
public bool HasVerticalAlignment { get; }
Property Value
Type |
---|
System.Boolean |
HorizontalAlignment
Gets or sets horizontal alignment of text in the cell.
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type |
---|
System.Windows.Forms.HorizontalAlignment |
Interior
Gets or sets a value indicating whether the solid back color , gradient, or pattern style with both back and fore color for a cell's back ground .
Declaration
public BrushInfo Interior { get; set; }
Property Value
Type |
---|
BrushInfo |
Store
Gets the CellStyleInfoStore object that holds all the data for this style object.
Declaration
public CellStyleInfoStore Store { get; }
Property Value
Type |
---|
CellStyleInfoStore |
TextColor
Gets or sets the color for drawing the cell text.
Declaration
public Color TextColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
TextMargins
Gets or sets the amount of space between the contents of the cell and the cell's border.
Declaration
public Padding TextMargins { get; set; }
Property Value
Type |
---|
System.Windows.Forms.Padding |
VerticalAlignment
Gets or sets vertical alignment of text in the cell.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
Type |
---|
System.Windows.Forms.VisualStyles.VerticalAlignment |
Methods
CreateSubObjectIdentity(StyleInfoProperty)
Overridden to create a product-specific identity object for the sub object.
Declaration
public override StyleInfoSubObjectIdentity CreateSubObjectIdentity(StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoProperty | sip | StyleInfoProperty descriptor for this sub object. |
Returns
Type | Description |
---|---|
StyleInfoSubObjectIdentity | Identity for the sub object. |
Overrides
GetDefaultStyle()
Override this method to return a default style object for your derived class.
Declaration
protected override StyleInfoBase GetDefaultStyle()
Returns
Type | Description |
---|---|
StyleInfoBase | A default style object. |
Overrides
GetFont()
Gets the cached GDI+ font generated from font information of the Font object.
Declaration
public Font GetFont()
Returns
Type | Description |
---|---|
System.Drawing.Font | Instance of the Font. |
MakeCopy(StyleInfoBase, StyleInfoProperty)
Makes an exact copy of the current object.
Declaration
public override IStyleInfoSubObject MakeCopy(StyleInfoBase newOwner, StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoBase | newOwner | The new owner style object for the copied object. |
StyleInfoProperty | sip | The identifier for this object. |
Returns
Type | Description |
---|---|
IStyleInfoSubObject | A copy of the current object registered with the new owner style object. |