Class FontWrapper
Summary description for FontWrapper.
Namespace: Syncfusion.XlsIO.Implementation
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class FontWrapper : CommonWrapper, ICloneParent, IInternalFont, IFont, IParentApplication, IOptimizedUpdate
Constructors
FontWrapper()
Creates new font wrapper.
Declaration
public FontWrapper()
FontWrapper(FontImpl)
Creates new font wrapper.
Declaration
public FontWrapper(FontImpl font)
Parameters
Type | Name | Description |
---|---|---|
FontImpl | font | Font to wrap. |
FontWrapper(FontImpl, Boolean, Boolean)
Creates new font wrapper.
Declaration
public FontWrapper(FontImpl font, bool bReadOnly, bool bRaiseEvents)
Parameters
Type | Name | Description |
---|---|---|
FontImpl | font | Font to wrap. |
System.Boolean | bReadOnly | Indicates whether wrapper should be read-only. |
System.Boolean | bRaiseEvents | Indicates whether to call OnBeforeChange and OnAfterChange when any property changes. |
Properties
Application
Application object.
Declaration
public IApplication Application { get; }
Property Value
Type |
---|
IApplication |
Baseline
Gets or sets the offset value of superscript and subscript
Declaration
public int Baseline { get; set; }
Property Value
Type |
---|
System.Int32 |
Bold
True if the font is bold. Read / write Boolean.
Declaration
public bool Bold { get; set; }
Property Value
Type |
---|
System.Boolean |
Color
Returns or sets the primary color of the object, as shown in the following table. Use the RGB function to create a color value. Read / write Integer.
Declaration
public ExcelKnownColors Color { get; set; }
Property Value
Type |
---|
ExcelKnownColors |
ColorObject
Declaration
public ColorObject ColorObject { get; }
Property Value
Type |
---|
ColorObject |
Font
Returns wrapped font. Read-only.
Declaration
public FontImpl Font { get; }
Property Value
Type |
---|
FontImpl |
FontIndex
Returns font index. Read-only.
Declaration
public int FontIndex { get; }
Property Value
Type |
---|
System.Int32 |
FontName
Returns or sets the font name. Read / write string.
Declaration
public string FontName { get; set; }
Property Value
Type |
---|
System.String |
Index
Returns index of the wrapped font. Read-only.
Declaration
public int Index { get; }
Property Value
Type |
---|
System.Int32 |
IsAutoColor
Indicates whether color is automatically selected. Read-only.
Declaration
public bool IsAutoColor { get; set; }
Property Value
Type |
---|
System.Boolean |
IsDirectAccess
Indicates whether wrapped font is accessed directly (without creating new font in OnBeforeChange, OnAfterChange methods).
Declaration
public bool IsDirectAccess { get; set; }
Property Value
Type |
---|
System.Boolean |
IsReadOnly
Indicates whether font is read-only.
Declaration
public bool IsReadOnly { get; set; }
Property Value
Type |
---|
System.Boolean |
Italic
True if the font style is italic. Read / write Boolean.
Declaration
public bool Italic { get; set; }
Property Value
Type |
---|
System.Boolean |
MacOSOutlineFont
True if the font is an outline font. Read / write Boolean.
Declaration
public bool MacOSOutlineFont { get; set; }
Property Value
Type |
---|
System.Boolean |
MacOSShadow
True if the font is a shadow font or if the object has a shadow. Read / write Boolean.
Declaration
public bool MacOSShadow { get; set; }
Property Value
Type |
---|
System.Boolean |
Parent
Parent object.
Declaration
public object Parent { get; }
Property Value
Type |
---|
System.Object |
RGBColor
Gets / sets font color. Searches for the closest color in the workbook palette.
Declaration
public Color RGBColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Size
Returns or sets the size of the font. Read / write Variant.
Declaration
public double Size { get; set; }
Property Value
Type |
---|
System.Double |
Strikethrough
True if the font is struck through with a horizontal line. Read / write Boolean
Declaration
public bool Strikethrough { get; set; }
Property Value
Type |
---|
System.Boolean |
Subscript
True if the font is formatted as subscript. False by default. Read / write Boolean.
Declaration
public bool Subscript { get; set; }
Property Value
Type |
---|
System.Boolean |
Superscript
True if the font is formatted as superscript. False by default. Read/write Boolean
Declaration
public bool Superscript { get; set; }
Property Value
Type |
---|
System.Boolean |
Underline
Returns or sets the type of underline applied to the font. Can be one of the following ExcelUnderlineStyle constants. Read / write ExcelUnderline.
Declaration
public ExcelUnderline Underline { get; set; }
Property Value
Type |
---|
ExcelUnderline |
VerticalAlignment
Gets / sets font vertical alignment.
Declaration
public ExcelFontVertialAlignment VerticalAlignment { get; set; }
Property Value
Type |
---|
ExcelFontVertialAlignment |
Workbook
Returns parent workbook.
Declaration
public WorkbookImpl Workbook { get; }
Property Value
Type |
---|
WorkbookImpl |
Wrapped
Returns wrapped font. Read-only.
Declaration
public FontImpl Wrapped { get; set; }
Property Value
Type |
---|
FontImpl |
Methods
BeginUpdate()
This method should be called before several updates to the object will take place.
Declaration
public override void BeginUpdate()
Overrides
Clone(WorkbookImpl, Object, IDictionary)
Returns copy of current object.
Declaration
public FontWrapper Clone(WorkbookImpl book, object parent, IDictionary dicFontIndexes)
Parameters
Type | Name | Description |
---|---|---|
WorkbookImpl | book | Parent Workbook. |
System.Object | parent | Parent object. |
System.Collections.IDictionary | dicFontIndexes | Dictionary with new indexes. |
Returns
Type | Description |
---|---|
FontWrapper | Clone of FontWraper. |
ColorObjectUpdate()
Update color object
Declaration
public void ColorObjectUpdate()
EndUpdate()
This method should be called after several updates to the object took place.
Declaration
public override void EndUpdate()
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type |
---|
System.Boolean |
GenerateNativeFont()
Generates .Net font object corresponding to the current font.
Declaration
public Font GenerateNativeFont()
Returns
Type | Description |
---|---|
System.Drawing.Font | Generated .Net font. |
Events
AfterChangeEvent
Event raised after wrapped font changed.
Declaration
public event EventHandler AfterChangeEvent
Event Type
Type |
---|
System.EventHandler |