Shape.IsLocked
Shape.IsLocked property
True means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the worksheet or objects in the worksheet are protected.
public bool IsLocked { get; set; }
Examples
[C#]
//Sets the specified shape to unlocked state
if (shape.Worksheet.IsProtected && shape.IsLocked)
{
shape.IsLocked = false;
}
//Sets the specified shape to a locked state
if (shape.Worksheet.IsProtected && !shape.IsLocked)
{
shape.IsLocked = true;
}
See Also
- class Shape
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells