NShape Reference
ShapeType.CreateInstance Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.Advanced > ShapeType Class >

NShape Reference
ShapeType.CreateInstance Method

Previous pageReturn to chapter overviewNext page

Create a completely new shape instance which will be initialized with the standard styles.

Syntax

Shape CreateInstance()

Shape CreateInstance(Template template)

Description

Both methods create a completely initialized and valid shape. The first one creates a shape that is self-contained while the result of the second one relies on a template. Therefore the second outcome is more or less a copy of the template's shape. The first method initializes the shape with the project styles the second method sets all styles to null so that the template's styles are used..

Parameters

Name

Description

template

Defines the shape's template. A shape's template can only be set through this constructor.

Exceptions

Name

Description

ArgumentNullException

The given Template is null.

See also

Concepts: Understanding Shape Creation