Enum ShapeAnchorType

ShapeAnchorType enumeration

Represents the anchor type.

public enum ShapeAnchorType

Values

NameValueDescription
TwoCellAnchor0Represents a two cell anchor placeholder
OneCellAnchor1Represents a one cell anchor placeholder

Examples

using System;
using Aspose.Cells;
using Aspose.Cells.Drawing;

namespace AsposeCellsExamples
{
    public class DrawingClassShapeAnchorTypeDemo
    {
        public static void Run()
        {
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            // Add a group box shape
            Shape box = worksheet.Shapes.AddRectangle(1, 0, 1, 0, 300, 250);
            box.Text = "Sample Group Box";
            
            // Demonstrate ShapeAnchorType usage
            box.AnchorType = ShapeAnchorType.TwoCellAnchor;
            box.UpperLeftRow = 2;
            box.UpperLeftColumn = 1;
            box.LowerRightRow = 8;
            box.LowerRightColumn = 4;

            // Save the workbook
            workbook.Save("ShapeAnchorTypeDemo.xlsx");
        }
    }
}

See Also