Syncfusion.XlsIO.Base
Example 


Height Property (IShape)

Height of the shape.
Syntax
'Declaration
 
Property Height As Integer
'Usage
 
Dim instance As IShape
Dim value As Integer
 
instance.Height = value
 
value = instance.Height
int Height {get; set;}
Example
The following code illustrates how to set and get shape's height using Height property.
using Syncfusion.XlsIO;
using System;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add shapes
            IShape shape = worksheet.Shapes.AddAutoShapes(AutoShapeType.Rectangle, 2, 2, 20, 70);
            IComboBoxShape comboBox = worksheet.Shapes.AddComboBox();
            
            //Set dimensions
            comboBox.Left = 140;
            comboBox.Top = 150;
            comboBox.Height = 20;
            comboBox.Width = 100;
            
            //Get dimensions
            Console.WriteLine(shape.Width);
            Console.WriteLine(shape.Height);
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//70
//20
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also