Syncfusion.XlsIO.Base
Example 


Width scale in percents.
Height scale in percents.

Scale Method

Scales the shape.
Syntax
'Declaration
 
Sub Scale( _
   ByVal scaleWidth As Integer, _
   ByVal scaleHeight As Integer _
) 
'Usage
 
Dim instance As IShape
Dim scaleWidth As Integer
Dim scaleHeight As Integer
 
instance.Scale(scaleWidth, scaleHeight)
void Scale( 
   int scaleWidth,
   int scaleHeight
)

Parameters

scaleWidth
Width scale in percents.
scaleHeight
Height scale in percents.
Example
The following code illustrates how to scale a shape after adding it.
using Syncfusion.XlsIO;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add shape
            IShape shape = worksheet.Shapes.AddAutoShapes(AutoShapeType.Rectangle, 2, 2, 20, 100);
            
            //Set scaling
            shape.Scale(50, 50);
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.47

See Also