WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridFontInfo - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridFontInfo

    Implements a object for font settings in a cell. Each font property of the cell can be configured individually.

    Font properties that have not been initialized will inherit default values from a base style.

    Inheritance
    System.Object
    ShouldSerializeBasedPersisterType
    StyleInfoBase
    StyleInfoSubObjectBase
    DataGridStyleInfoSubObject
    GridFontInfo
    Implements
    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Inherited Members
    DataGridStyleInfoSubObject.GetCellStyleInfo()
    DataGridStyleInfoSubObject.ToString()
    DataGridStyleInfoSubObject.Info
    StyleInfoSubObjectBase.Dispose(Boolean)
    StyleInfoSubObjectBase.IntGetDefaultStyleInfo(StyleInfoProperty)
    StyleInfoSubObjectBase.SubObjectIdentity
    StyleInfoSubObjectBase.Sip
    StyleInfoSubObjectBase.Data
    StyleInfoSubObjectBase.Owner
    StyleInfoBase.WriteXml(XmlWriter)
    StyleInfoBase.ReadXml(XmlReader)
    StyleInfoBase.SetStore(StyleInfoStore)
    StyleInfoBase.ClearCache()
    StyleInfoBase.Dispose()
    StyleInfoBase.Equals(Object)
    StyleInfoBase.EqualsObject(Object, Object)
    StyleInfoBase.GetHashCode()
    StyleInfoBase.ToString(String)
    StyleInfoBase.ToString(String, IFormatProvider)
    StyleInfoBase.ParseString(String)
    StyleInfoBase.BeginInit()
    StyleInfoBase.EndInit()
    StyleInfoBase.BeginUpdate()
    StyleInfoBase.EndUpdate()
    StyleInfoBase.CreateSubObjectIdentity(StyleInfoProperty)
    StyleInfoBase.GetDefaultStyleInfoStore(StyleInfoProperty)
    StyleInfoBase.OnStyleChanging(StyleInfoProperty)
    StyleInfoBase.IsSubset(IStyleInfo)
    StyleInfoBase.CopyFrom(IStyleInfo)
    StyleInfoBase.ModifyStyle(IStyleInfo, StyleModifyType)
    StyleInfoBase.InheritStyle(IStyleInfo, StyleModifyType)
    StyleInfoBase.MergeStyle(IStyleInfo)
    StyleInfoBase.HasValue(StyleInfoProperty)
    StyleInfoBase.IsValueModified(StyleInfoProperty)
    StyleInfoBase.ResetValue(StyleInfoProperty)
    StyleInfoBase.GetValue(StyleInfoProperty)
    StyleInfoBase.GetDefaultValue(StyleInfoProperty)
    StyleInfoBase.GetShortValue(StyleInfoProperty)
    StyleInfoBase.SetValue(StyleInfoProperty, Object)
    StyleInfoBase.SetValue(StyleInfoProperty, Int16)
    StyleInfoBase.IConvertible.ToUInt64(IFormatProvider)
    StyleInfoBase.IConvertible.ToSByte(IFormatProvider)
    StyleInfoBase.IConvertible.ToDouble(IFormatProvider)
    StyleInfoBase.IConvertible.ToDateTime(IFormatProvider)
    StyleInfoBase.IConvertible.ToSingle(IFormatProvider)
    StyleInfoBase.IConvertible.ToBoolean(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt32(IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt16(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt16(IFormatProvider)
    StyleInfoBase.IConvertible.ToString(IFormatProvider)
    StyleInfoBase.IConvertible.ToByte(IFormatProvider)
    StyleInfoBase.IConvertible.ToChar(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt64(IFormatProvider)
    StyleInfoBase.IConvertible.GetTypeCode()
    StyleInfoBase.IConvertible.ToDecimal(IFormatProvider)
    StyleInfoBase.IConvertible.ToType(Type, IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt32(IFormatProvider)
    StyleInfoBase.Identity
    StyleInfoBase.Store
    StyleInfoBase.CacheValues
    StyleInfoBase.WeakReferenceChangedListeners
    StyleInfoBase.Updating
    StyleInfoBase.IsEmpty
    StyleInfoBase.IsChanged
    StyleInfoBase.Changed
    StyleInfoBase.Changing
    ShouldSerializeBasedPersisterType.GetNewAttributesCount(PropertyDescriptor)
    ShouldSerializeBasedPersisterType.AddNewAttributes(PropertyDescriptor, Attribute[], Int32)
    ShouldSerializeBasedPersisterType.GetCustomPDC(PropertyDescriptorCollection)
    ShouldSerializeBasedPersisterType.CheckAllProperties
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 that holds data for this . All changes in this style object will saved in the object.

    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 object is bold.

    Declaration
    public bool Bold { get; set; }
    Property Value
    Type Description
    System.Boolean

    Default

    Gets a default to be used with a default style.

    Declaration
    public static GridFontInfo Default { get; }
    Property Value
    Type Description
    GridFontInfo
    Remarks

    The of the class will return the default border info that this method generates through its overridden version of .

    Facename

    Gets or sets the face name of this object.

    Declaration
    public string Facename { get; set; }
    Property Value
    Type Description
    System.String

    FontStyle

    Gets or sets style information for the font.

    Declaration
    public FontStyle FontStyle { get; set; }
    Property Value
    Type Description
    System.Drawing.FontStyle

    HasBold

    Gets a value indicating whether the property has been initialized.

    Declaration
    public bool HasBold { get; }
    Property Value
    Type Description
    System.Boolean

    HasFacename

    Gets a value indicating whether the Facename property has been initialized.

    Declaration
    public bool HasFacename { get; }
    Property Value
    Type Description
    System.Boolean

    HasItalic

    Gets a value indicating whether the property has been initialized.

    Declaration
    public bool HasItalic { get; }
    Property Value
    Type Description
    System.Boolean

    HasOrientation

    Gets a value indicating whether the Orientation property has been initialized.

    Declaration
    public bool HasOrientation { get; }
    Property Value
    Type Description
    System.Boolean

    HasSize

    Gets a value indicating whether the property has been initialized.

    Declaration
    public bool HasSize { get; }
    Property Value
    Type Description
    System.Boolean

    HasStrikeout

    Gets a value indicating whether the property has been initialized.

    Declaration
    public bool HasStrikeout { get; }
    Property Value
    Type Description
    System.Boolean

    HasUnderline

    Gets a value indicating whether the property has been initialized.

    Declaration
    public bool HasUnderline { get; }
    Property Value
    Type Description
    System.Boolean

    HasUnit

    Gets a value indicating whether the property has been initialized.

    Declaration
    public bool HasUnit { get; }
    Property Value
    Type Description
    System.Boolean

    Italic

    Gets or sets a value indicating whether this object is italic.

    Declaration
    public bool Italic { get; set; }
    Property Value
    Type Description
    System.Boolean

    Orientation

    Gets or sets the orientation of this object.

    Declaration
    public int Orientation { get; set; }
    Property Value
    Type Description
    System.Int32

    Size

    Gets or sets the size in pixels of this object.

    Declaration
    public float Size { get; set; }
    Property Value
    Type Description
    System.Single

    Strikeout

    Gets or sets a value indicating whether this object should draw a horizontal line through the text.

    Declaration
    public bool Strikeout { get; set; }
    Property Value
    Type Description
    System.Boolean

    Underline

    Gets or sets a value indicating whether this object is underlined.

    Declaration
    public bool Underline { get; set; }
    Property Value
    Type Description
    System.Boolean

    Unit

    Gets or sets the graphics unit of this object.

    Declaration
    public GraphicsUnit Unit { get; set; }
    Property Value
    Type Description
    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 object.

    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
    StyleInfoBase.GetDefaultStyle()

    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
    StyleInfoSubObjectBase.MakeCopy(StyleInfoBase, StyleInfoProperty)

    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
    StyleInfoSubObjectBase.OnStyleChanged(StyleInfoProperty)

    ResetBold()

    Resets the property.

    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 property.

    Declaration
    public void ResetItalic()

    ResetOrientation()

    Resets the Orientation property.

    Declaration
    public void ResetOrientation()

    ResetSize()

    Resets the property.

    Declaration
    public void ResetSize()

    ResetStrikeout()

    Resets the property.

    Declaration
    public void ResetStrikeout()

    ResetUnderline()

    Resets the property.

    Declaration
    public void ResetUnderline()

    ResetUnit()

    Resets the property.

    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.

    Implements

    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved