Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IShape Interface : IsMoveWithCell Property

IsMoveWithCell Property

Indicates whether shape must be moved with cells.
Syntax
'Declaration
 
Property IsMoveWithCell As Boolean
'Usage
 
Dim instance As IShape
Dim value As Boolean
 
instance.IsMoveWithCell = value
 
value = instance.IsMoveWithCell
bool IsMoveWithCell {get; set;}
Example
By default IsMoveWithCell property is set to "true" so the shape will be moving along the cell if the cell's width is increased or decreased. Here for example, we set IsMoveWithCell to "false".
using Syncfusion.XlsIO;
            
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 shape
            IShape shape = worksheet.Shapes.AddAutoShapes(AutoShapeType.Rectangle, 2, 2, 20, 70);
            
            //Set move with cells
            shape.IsMoveWithCell = false;
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also