Version

Add(PredefinedShapeType,Rect) Method

Adds a predefined shape to the collection with the specified bounds.
Syntax

Parameters

shapeType
The type of shape to add to the collection.
boundsInTwips
The bounds of the shape on the Worksheet in twips (1/20th of a point).

Return Value

A WorksheetShape-derived instance representing the predefined shape.
Exceptions
ExceptionDescription
System.InvalidOperationExceptionThis shapes collection belongs to a WorksheetShapeGroup which isn't placed on a Worksheet yet. In this case, call Add(PredefinedShapeType,Sheet,Rect) instead and specify the Worksheet where the group will be added.
Infragistics.Documents.Excel.MockClasses.InvalidEnumArgumentExceptionshapeType is not defined in the PredefinedShapeType enumeration.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also