[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Workbook.GraphicsInfo

GraphicsInfo Property

GraphicsInfo

Gets or sets the graphics information used by the workbook.

If no graphics information has been assigned, the workbook uses built-in graphics information.

Use this property to provide custom digit-width measurement logic for workbook rendering and layout calculations. Set the property to null to use the built-in graphics information.

Declaration
public IGraphicsInfo GraphicsInfo { get; set; }
Public Property GraphicsInfo As IGraphicsInfo
Implements
Examples
class CustomGraphicsInfo : IGraphicsInfo
{
    public double GetDigitWidth(TextFormatInfo textFormat)
    {
        if ("Calibri" == textFormat.FontFamily)
        {
            return 8 * textFormat.FontSize / 11;
        }

        return 7 * textFormat.FontSize / 11;
    }
}
worksheet.Range["A1"].Value = "12345";
IGraphicsInfo graphicsInfo = new CustomGraphicsInfo();
workbook.GraphicsInfo = graphicsInfo;
IGraphicsInfo currentGraphicsInfo = workbook.GraphicsInfo;