menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class FontStyle - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class FontStyle

    Encapsulates the font properties of an object.

    Inheritance
    System.Object
    PropertyContainer
    FontStyle
    Implements
    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Inherited Members
    PropertyContainer.Dispose()
    PropertyContainer.FullContainerName
    PropertyContainer.GetPropertyContainerByName(String)
    PropertyContainer.HistoryService
    PropertyContainer.IPropertyObserver.OnPropertyChanged(String, String)
    PropertyContainer.IPropertyObserver.OnPropertyChanging(String, String, Object)
    PropertyContainer.ISerializable.GetObjectData(SerializationInfo, StreamingContext)
    PropertyContainer.m_propertyObserver
    PropertyContainer.OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)
    PropertyContainer.OnPropertyChanged(String)
    PropertyContainer.OnPropertyChanging(String, Object)
    PropertyContainer.PropertyObserber
    PropertyContainer.ProvideServiceReference(RuntimeTypeHandle)
    PropertyContainer.RecordPropertyChanged(String)
    PropertyContainer.UpdateServiceReferences(IServiceReferenceProvider)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public sealed class FontStyle : PropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable

    Constructors

    FontStyle()

    Initializes a new instance of the FontStyle class.

    Declaration
    public FontStyle()

    FontStyle(FontStyle)

    Initializes a new instance of the FontStyle class.

    Declaration
    public FontStyle(FontStyle src)
    Parameters
    Type Name Description
    FontStyle src

    The font style.

    Properties

    Bold

    Gets or sets a value that indicates whether this Font is bolded in the Diagram control TextEditor.

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

    Family

    Gets or sets Font family name.

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

    InheritContainerMeasureUnits

    Gets or sets a value indicating whether current instance inherit container measure units.

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

    true if current instance inherit container measure units; otherwise, false.

    Overrides
    PropertyContainer.InheritContainerMeasureUnits

    Italic

    Gets or sets to indicate whether this font has the italic style to truly slanted and appear in Diagram control.

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

    MeasureUnit

    Gets or sets the measure unit.

    Declaration
    public override MeasureUnits MeasureUnit { get; set; }
    Property Value
    Type Description
    MeasureUnits

    The measure unit.

    Overrides
    PropertyContainer.MeasureUnit

    Name

    Gets or sets Name of the font.

    Declaration
    [Obsolete("This property will be no more supported since next version.Use FamilyName instead.")]
    public string Name { get; set; }
    Property Value
    Type
    System.String

    PointSize

    Gets or sets Size of font in points.

    Declaration
    public float PointSize { get; set; }
    Property Value
    Type
    System.Single
    Remarks

    Performs conversion if FontStyle.Unit is not point.

    Size

    Gets or sets Size of font in logical units.

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

    Strikeout

    Gets or sets a value that indicates whether this font specifies a horizontal line through the text in Diagram control.

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

    Style

    Gets or sets Style of the font.

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

    Underline

    Gets or sets a value that indicates whether to underline the text in Diagram�s TextEditor.

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

    Unit

    Gets or sets Unit of measure for font size (default is points).

    Declaration
    public MeasureUnits Unit { get; set; }
    Property Value
    Type
    MeasureUnits

    Methods

    Clone()

    Creates a new object that is a copy of the current instance.

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object

    A new object that is a copy of this instance.

    Overrides
    PropertyContainer.Clone()

    CreateFont()

    Creates a font object matching the properties of this FontStyle.

    Declaration
    public Font CreateFont()
    Returns
    Type Description
    System.Drawing.Font

    Font object.

    GetObjectData(SerializationInfo, StreamingContext)

    Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

    Declaration
    protected override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The System.Runtime.Serialization.SerializationInfo to populate with data.

    System.Runtime.Serialization.StreamingContext context

    The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

    Overrides
    PropertyContainer.GetObjectData(SerializationInfo, StreamingContext)
    Exceptions
    Type Condition
    System.Security.SecurityException

    The caller does not have the required permission.

    GetPropertyContainerName()

    Gets the name of the property container.

    Declaration
    protected override string GetPropertyContainerName()
    Returns
    Type Description
    System.String

    The property container name.

    Overrides
    PropertyContainer.GetPropertyContainerName()

    Implements

    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved