Table of Contents

Class vdLayers

Namespace
VectorDraw.Professional.vdCollections
Assembly
VectorDraw.Professional.dll

Represents a collection of vdLayer objects and provides methods and helpers
to manage layer tables for a document.
Layers are used to organize the objects of a document in groups and control the visibility and other properties of these groups.
Each vdFigure reference a layer through the Layer property.

public sealed class vdLayers : vdBaseObject, IDisposable, IVDSerialise, IBaseObject, IEnumerable
Inheritance
vdLayers
Implements
Inherited Members

Examples

// Create and add a named layer to a document's layer table: // var layer = new vdLayer() { Name = "MyLayer" }; // document.Layers.AddItem(layer); // --or-- var layer = document.Layers.Add("MyLayer");

Constructors

vdLayers()

Initializes the vdLayers collection object.

Properties

Count

Get the item's count of the collection.

this[int]

Get a vdLayer object from the collection at a specified index.

ItemType

Returns the Type of Items in the collection

Last

Returns the last item in the collection.

LayersFilters

Get/Set the layers filters that belong to this layer collection.

LayersGroups

Get/Set tha layers groups that belong to this layer collection.

Standard

Gets the standard layer for the collection. The standard layer uses the reserved name "0".
If a layer named "0" does not exist this property will create it, initialize it with the
document defaults and add it to the collection. Accessing this property guarantees a
non-null vdLayer instance owned by this collection;
Standard table objects cannot be Deleted.

Methods

Add(object)

Adds an object to the end of the collection.

Add(string)

Creates and adds a vdLayer object to the collection with the specified name.

AddItem(object)

Adds an object to the collection.

AddItem(vdLayer)

Adds a vdLayer object to the collection.

AddResolveProperty(object, string, string)

Adds the parameters to the resolve list of the collection.

ChangeOrder(vdLayer, bool)

Changes the position of a vdLayer object to the front or the end of the collection.

ClearIndexDictionary()

Clears the Index of the Dictionary. Internally used to speed up Swap method.

DeSerialize(DeSerializer, string, object)

This Function is called foreach field name of the vdLayers object when opening in vdml format.

Dispose()

Releases all resources used by this object.

EnsureDefaults()

Ensures the default values to the properties of the standard vdLayer object.

FindFromId(int)

Gets an object that belongs to collection passing through its ID number.

FindItem(object)

Checks if an object exists in the collection.

FindItem(vdLayer)

Checks if an object exists in the collection.

FindName(string)

Finds a vdLayer object with the specified name in the collection.

GetEnumerator()

Implements the "foreach" expression for the collection.

GetGroupReferences(vdPrimary)

Returns all vdPrimary objects (vdLayersGroup or vdLayersFilter) that have the passed object as GroupOwner.

GetNotDeletedItems()

Get all non deleted objects of the collection.

GetNotDeletedItemsAndVisibleOnForms()

Get all non deleted objects of the collection.

GetObjectRealPosition(object)

Find the index where a specified object is located in the list.

InitDefaults(vdDocument)

Ensures the existance of the standard vdLayer object and also sets the document parameter to be the document of the collection.

InsertAt(int, object)

Insert an object at a specified index.

InsertAt(int, vdLayer)

Insert a vdLayer object to a specified index of the collection.

InsertCopyOf(vdLayer)

Adds a clone of the obj in the collection if it is not exist.

InternalSetOwner(vdBaseObject)

Internally used only.

Set the object owner

IsDefault(vdPrimary)

Checks if the parameter passed is the standard vdLayer object.

MakeIndexDictionary()

Creates an Index of the Dictionary. Internally used to speed up Swap method.

Purge()

Sets as Deleted all vdLayers that are not being used in the Collection's Document.

RemoveAll()

Removes all objects from the collection.

RemoveAt(int)

Removes an object from the specified index of the collection.

RemoveItem(object)

Removes an object from the collection.

RemoveItem(vdLayer)

Removes a specific vdLayer object from the collection.

ResolveProperties()

Resolves all the properties added with the AddResolveProperty(object, string, string) function.

Serialize(Serializer)

This Function is called when saving the vdLayers object to vdml format.

Sort(IComparer<vdLayer>)

Sorts the elements in a range of elements in the entire collection using the specified IComparer<T> generic interface.

ToString()

Gets a System.String that represents the count of the vdLayers collection Object.

getUniqueTableName(string)

Creates a unique string for use as name to a vdLayer object.

swap(vdLayer, vdLayer)

Swaps the position between two different vdLayer objects existing in the collection.

See Also