Class GridFontInfo
Implements a
Font properties that have not been initialized will inherit default values from a base style.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.WinForms.DataGrid.Styles
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public class GridFontInfo : DataGridStyleInfoSubObject, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
Constructors
GridFontInfo()
Initializes a new instance of the GridFontInfo class.
Declaration
public GridFontInfo()
GridFontInfo(StyleInfoSubObjectIdentity)
Initializes a new instance of the GridFontInfo class and associates it with an existing
Declaration
public GridFontInfo(StyleInfoSubObjectIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A DataGridStyleInfoSubObjectIdentity that holds the identity for this |
GridFontInfo(StyleInfoSubObjectIdentity, GridFontInfoStore)
Initializes a new instance of the GridFontInfo class and associates it with an existing DataGridStyleInfoSubObjectIdentity.
Declaration
public GridFontInfo(StyleInfoSubObjectIdentity identity, GridFontInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A DataGridStyleInfoSubObjectIdentity that holds the identity for this |
GridFontInfoStore | store | A |
GridFontInfo(Font)
Initializes a new instance of the GridFontInfo class and initializes its FaceName, FontStyle, Size and Unit from the specified font object.
Declaration
public GridFontInfo(Font font)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Font | font | A System.Drawing.Font with font information. |
Properties
Bold
Gets or sets a value indicating whether this
Declaration
public bool Bold { get; set; }
Property Value
Type |
---|
System.Boolean |
Default
Gets a default
Declaration
public static GridFontInfo Default { get; }
Property Value
Type |
---|
GridFontInfo |
Remarks
The
Facename
Gets or sets the face name of this
Declaration
public string Facename { get; set; }
Property Value
Type |
---|
System.String |
FontStyle
Gets or sets style information for the font.
Declaration
public FontStyle FontStyle { get; set; }
Property Value
Type |
---|
System.Drawing.FontStyle |
HasBold
Gets a value indicating whether the
Declaration
public bool HasBold { get; }
Property Value
Type |
---|
System.Boolean |
HasFacename
Gets a value indicating whether the Facename property has been initialized.
Declaration
public bool HasFacename { get; }
Property Value
Type |
---|
System.Boolean |
HasItalic
Gets a value indicating whether the
Declaration
public bool HasItalic { get; }
Property Value
Type |
---|
System.Boolean |
HasOrientation
Gets a value indicating whether the Orientation property has been initialized.
Declaration
public bool HasOrientation { get; }
Property Value
Type |
---|
System.Boolean |
HasSize
Gets a value indicating whether the
Declaration
public bool HasSize { get; }
Property Value
Type |
---|
System.Boolean |
HasStrikeout
Gets a value indicating whether the
Declaration
public bool HasStrikeout { get; }
Property Value
Type |
---|
System.Boolean |
HasUnderline
Gets a value indicating whether the
Declaration
public bool HasUnderline { get; }
Property Value
Type |
---|
System.Boolean |
HasUnit
Gets a value indicating whether the
Declaration
public bool HasUnit { get; }
Property Value
Type |
---|
System.Boolean |
Italic
Gets or sets a value indicating whether this
Declaration
public bool Italic { get; set; }
Property Value
Type |
---|
System.Boolean |
Orientation
Gets or sets the orientation of this
Declaration
public int Orientation { get; set; }
Property Value
Type |
---|
System.Int32 |
Size
Gets or sets the size in pixels of this
Declaration
public float Size { get; set; }
Property Value
Type |
---|
System.Single |
Strikeout
Gets or sets a value indicating whether this
Declaration
public bool Strikeout { get; set; }
Property Value
Type |
---|
System.Boolean |
Underline
Gets or sets a value indicating whether this
Declaration
public bool Underline { get; set; }
Property Value
Type |
---|
System.Boolean |
Unit
Gets or sets the graphics unit of this
Declaration
public GraphicsUnit Unit { get; set; }
Property Value
Type |
---|
System.Drawing.GraphicsUnit |
Methods
CreateFont(String, Single, FontStyle, GraphicsUnit)
Creates the instances of
Declaration
public static Font CreateFont(string facename, float size, FontStyle fontStyle, GraphicsUnit unit)
Parameters
Type | Name | Description |
---|---|---|
System.String | facename | Holds the style identity information. |
System.Single | size | Holds info for GridFontInfoStore. |
System.Drawing.FontStyle | fontStyle | FontStyle instance. |
System.Drawing.GraphicsUnit | unit | Graphics unit. |
Returns
Type | Description |
---|---|
System.Drawing.Font | The new |
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 or creates a cached GDI+ Font generated from font information of this GridFontInfo object.
Declaration
public Font GetFont()
Returns
Type | Description |
---|---|
System.Drawing.Font | Instance of the Font. |
GetPrivateFont(String)
Get the specific font family.
Declaration
public static FontFamily GetPrivateFont(string familyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | familyName | Font family name. |
Returns
Type | Description |
---|---|
System.Drawing.FontFamily | Returns the font family instance. |
MakeCopy(StyleInfoBase, StyleInfoProperty)
Creates 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 | Identifier for this object. |
Returns
Type | Description |
---|---|
IStyleInfoSubObject | Copy of the current object. |
Overrides
OnStyleChanged(StyleInfoProperty)
Invoked when Font style is changed and reset the font.
Declaration
protected override void OnStyleChanged(StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoProperty | sip | The StyleInfoProperty that identifies the changed style property. |
Overrides
ResetBold()
Resets the
Declaration
public void ResetBold()
ResetFacename()
Resets the Facename property.
Declaration
public void ResetFacename()
ResetGdipFont()
Reset the GDIP font.
Declaration
public void ResetGdipFont()
ResetItalic()
Resets the
Declaration
public void ResetItalic()
ResetOrientation()
Resets the Orientation property.
Declaration
public void ResetOrientation()
ResetSize()
Resets the
Declaration
public void ResetSize()
ResetStrikeout()
Resets the
Declaration
public void ResetStrikeout()
ResetUnderline()
Resets the
Declaration
public void ResetUnderline()
ResetUnit()
Resets the
Declaration
public void ResetUnit()
SizeInWorldUnit(Font)
Gets the em-size of the specified font object in world-units.
Declaration
public static float SizeInWorldUnit(Font font)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Font | font | The font object. |
Returns
Type | Description |
---|---|
System.Single | The size in world units. |