ShapeCollection.Item

ShapeCollection indexer (1 of 2)

Gets the shape object at the specific index.

public Shape this[int index] { get; }
ParameterDescription
index

Examples


[C#]
//get the shape
Shape shape = shapes[shapes.Count -1];

See Also


ShapeCollection indexer (2 of 2)

Gets the shape object by the shape image

public Shape this[string name] { get; }
ParameterDescription
name

Examples


[C#]
//add a shape
shapes.AddRectangle(2, 0, 2, 0, 130, 130);
//get the shape
Shape shape1 = shapes["Rectangle 1"];
if(shape1 != null)
{
    //Got the shape named 'Rectangle 1'.
}

See Also