Class FontStyle
Encapsulates the font properties of an object.
Implements
Inherited Members
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 |
|
Overrides
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
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
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
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. |