NShape Reference
LayerController.RemoveLayer Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.Controllers > LayerController Class >

NShape Reference
LayerController.RemoveLayer Method

Previous pageReturn to chapter overviewNext page

Removes the layer with the given name from the given diagram's layer collection.

Syntax

public void RemoveLayer(Diagram diagram, string layerName)

Description

The layer is removed even if there are shapes in the diagram, which are visible within the given layer. Shapes that have been visible in the given layer only, are subsequently not assigned to any layer and therefore always visible.

Parameters

Name

Description

diagram

Specifies the diagram to be edited.

layerName

Name of the layer to be removed.

Exceptions

Exception

Condition

ArgumentNullException

Diagram is null.
Layer name is null or empty.