Class ChartFontInfo
Provides a StyleInfoSubObjectBase object for font settings associated with a point. Each font property of the point can be configured individually.
Font properties that have not been initialized will inherit default values from a base style.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Chart
Assembly: Syncfusion.Chart.Base.dll
Syntax
public class ChartFontInfo : ChartSubStyleInfoBase, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
Examples
The following code changes font information for a point:
this.chart.Series[0].Styles[0].Font.Facename = "Arial";
Constructors
ChartFontInfo()
Initializes a ChartFontInfo.
Declaration
public ChartFontInfo()
ChartFontInfo(StyleInfoSubObjectIdentity)
Initalizes a new ChartFontInfo object and associates it with an existing StyleInfoSubObjectIdentity.
Declaration
public ChartFontInfo(StyleInfoSubObjectIdentity identity)
Parameters
| Type | Name | Description |
|---|---|---|
| StyleInfoSubObjectIdentity | identity | A StyleInfoSubObjectIdentity that holds the identity for this ChartFontInfo. |
ChartFontInfo(StyleInfoSubObjectIdentity, ChartFontInfoStore)
Initalizes a new ChartFontInfo object and associates it with an existing StyleInfoSubObjectIdentity.
Declaration
public ChartFontInfo(StyleInfoSubObjectIdentity identity, ChartFontInfoStore store)
Parameters
| Type | Name | Description |
|---|---|---|
| StyleInfoSubObjectIdentity | identity | A StyleInfoSubObjectIdentity that holds the identity for this ChartFontInfo. A ChartFontInfoStore that holds data for this ChartFontInfo. All changes made in this style object will be saved in the ChartFontInfoStore object. |
| ChartFontInfoStore | store |
Properties
Bold
Indicates whether this ChartFontInfo object is bold.
Declaration
public bool Bold { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Default
Returns a default ChartFontInfo to be used with a default style.
Declaration
public static ChartFontInfo Default { get; }
Property Value
| Type |
|---|
| ChartFontInfo |
Remarks
The Default of the ChartStyleInfo class will return the default border info that this method generates through its overridden version of Syncfusion.Windows.Forms.Chart.ChartFontInfo.GetDefaultStyle.
Facename
Gets or sets the face name of this ChartFontInfo object.
Declaration
public string Facename { get; set; }
Property Value
| Type |
|---|
| System.String |
FontFamilyTemplate
Gets or sets the font family of this ChartFontInfo object.
Declaration
public FontFamily FontFamilyTemplate { get; set; }
Property Value
| Type |
|---|
| System.Drawing.FontFamily |
FontStyle
Gets or sets the style information for the font.
Declaration
public FontStyle FontStyle { get; set; }
Property Value
| Type |
|---|
| System.Drawing.FontStyle |
GdipFont
Creates or returns a cached GDI+ font generated from font information of this ChartFontInfo object.
Declaration
public Font GdipFont { get; }
Property Value
| Type |
|---|
| System.Drawing.Font |
HasBold
Indicates whether the Bold property has been initialized.
Declaration
public bool HasBold { get; }
Property Value
| Type |
|---|
| System.Boolean |
HasFontFamilyTemplate
Indicates whether the FontFamilyTemplate property has been initialized.
Declaration
public bool HasFontFamilyTemplate { get; }
Property Value
| Type |
|---|
| System.Boolean |
HasItalic
Indicates whether the Italic property has been initialized.
Declaration
public bool HasItalic { get; }
Property Value
| Type |
|---|
| System.Boolean |
HasName
Indicates whether the Facename property has been initialized.
Declaration
public bool HasName { get; }
Property Value
| Type |
|---|
| System.Boolean |
HasOrientation
Indicates whether the Orientation property has been initialized.
Declaration
public bool HasOrientation { get; }
Property Value
| Type |
|---|
| System.Boolean |
HasSize
Indicates whether the Size property has been initialized.
Declaration
public bool HasSize { get; }
Property Value
| Type |
|---|
| System.Boolean |
HasStrikeout
Indicates whether the Strikeout property has been initialized.
Declaration
public bool HasStrikeout { get; }
Property Value
| Type |
|---|
| System.Boolean |
HasUnderline
Indicates whether the Underline property has been initialized.
Declaration
public bool HasUnderline { get; }
Property Value
| Type |
|---|
| System.Boolean |
HasUnit
Indicates whether the Unit property has been initialized.
Declaration
public bool HasUnit { get; }
Property Value
| Type |
|---|
| System.Boolean |
Italic
Indicates whether this ChartFontInfo object is italic.
Declaration
public bool Italic { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Orientation
Gets or sets the orientation of this ChartFontInfo object.
Declaration
public int Orientation { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
Size
Gets or sets the size in pixels of this ChartFontInfo object.
Declaration
public float Size { get; set; }
Property Value
| Type |
|---|
| System.Single |
Strikeout
Indicates whether this ChartFontInfo object should draw a horizontal line through the text.
Declaration
public bool Strikeout { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Underline
Indicates whether this ChartFontInfo object is underlined.
Declaration
public bool Underline { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Unit
Gets or sets the graphics unit for this ChartFontInfo object.
Declaration
public GraphicsUnit Unit { get; set; }
Property Value
| Type |
|---|
| System.Drawing.GraphicsUnit |
Methods
Dispose()
Clears all resources used by the component.
Declaration
public void Dispose()
Finalize()
Declaration
protected void Finalize()
MakeCopy(StyleInfoBase, StyleInfoProperty)
Declaration
public override IStyleInfoSubObject MakeCopy(StyleInfoBase newOwner, StyleInfoProperty sip)
Parameters
| Type | Name | Description |
|---|---|---|
| StyleInfoBase | newOwner | |
| StyleInfoProperty | sip |
Returns
| Type |
|---|
| IStyleInfoSubObject |
Overrides
OnStyleChanged(StyleInfoProperty)
Declaration
protected override void OnStyleChanged(StyleInfoProperty sip)
Parameters
| Type | Name | Description |
|---|---|---|
| StyleInfoProperty | sip |
Overrides
ResetBold()
Resets the Bold property.
Declaration
public void ResetBold()
ResetFontFamilyTemplate()
Resets the FontFamilyTemplate property.
Declaration
public void ResetFontFamilyTemplate()
ResetItalic()
Resets the Italic property.
Declaration
public void ResetItalic()
ResetName()
Resets the Facename property.
Declaration
public void ResetName()
ResetOrientation()
Resets the Orientation property.
Declaration
public void ResetOrientation()
ResetSize()
Resets the Size property.
Declaration
public void ResetSize()
ResetStrikeout()
Resets the Strikeout property.
Declaration
public void ResetStrikeout()
ResetUnderline()
Resets the Underline property.
Declaration
public void ResetUnderline()
ResetUnit()
Resets the Unit property.
Declaration
public void ResetUnit()
ShouldSerializeBold()
Indicates whether the Bold property should be serialized
Declaration
protected bool ShouldSerializeBold()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeFontFamilyTemplate()
Indicates whether the FontFamily property should be serialized
Declaration
protected bool ShouldSerializeFontFamilyTemplate()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeItalic()
Indicates whether the Italic property should be serialized
Declaration
protected bool ShouldSerializeItalic()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeName()
Indicates whether the Facename property should be serialized
Declaration
protected bool ShouldSerializeName()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeOrientation()
Indicates whether the Orientation property should be serialized
Declaration
protected bool ShouldSerializeOrientation()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeSize()
Indicates whether the Size property should be serialized
Declaration
protected bool ShouldSerializeSize()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeStrikeout()
Indicates whether the Strikeout property should be serialized
Declaration
protected bool ShouldSerializeStrikeout()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeUnderline()
Indicates whether the Underline property should be serialized
Declaration
protected bool ShouldSerializeUnderline()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeUnit()
Indicates whether the Unit property should be serialized
Declaration
protected bool ShouldSerializeUnit()
Returns
| Type |
|---|
| System.Boolean |
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. |