Class LayerCollection
A collection of Layer objects.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class LayerCollection : CollectionEx, IList, ICollection, IEnumerable, ICloneable, ISerializable, IServiceReferenceHolder, IServiceReferenceProvider
Constructors
LayerCollection()
Initializes a new instance of the LayerCollection class.
Declaration
public LayerCollection()
LayerCollection(LayerCollection)
Initializes a new instance of the LayerCollection class.
Declaration
public LayerCollection(LayerCollection src)
Parameters
Type | Name | Description |
---|---|---|
LayerCollection | src | The source instance. |
LayerCollection(Object)
Initializes a new instance of the LayerCollection class.
Declaration
public LayerCollection(object owner)
Parameters
Type | Name | Description |
---|---|---|
System.Object | owner | The owner. |
LayerCollection(SerializationInfo, StreamingContext)
Initializes a new instance of the LayerCollection class.
Declaration
public LayerCollection(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The serialization info. |
System.Runtime.Serialization.StreamingContext | context | The serialization context. |
Fields
c_strLAYER
Default new layer item name.
Declaration
protected const string c_strLAYER = "Layer"
Field Value
Type |
---|
System.String |
Properties
Container
Gets or sets the collection container.
Declaration
public object Container { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The container. |
Item[Int32]
Gets or sets the Layer at the specified index.
Declaration
public Layer this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Property Value
Type | Description |
---|---|
Layer | The layer at the specified index. |
Item[String]
Gets or sets the Layer with the specified layer name.
Declaration
public Layer this[string strLayerName] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | strLayerName | The layer name. |
Property Value
Type | Description |
---|---|
Layer | The layer with the specified name. |
Methods
Add(Layer)
Adds the specified layer.
Declaration
public int Add(Layer layer)
Parameters
Type | Name | Description |
---|---|---|
Layer | layer | The layer. |
Returns
Type | Description |
---|---|
System.Int32 | The value. |
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Overrides
Contains(Layer)
Determines whether collection contains the specified layer.
Declaration
public bool Contains(Layer layer)
Parameters
Type | Name | Description |
---|---|---|
Layer | layer | The layer. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Contains(String)
Determines whether collections contains the layer with specified name.
Declaration
public bool Contains(string strLayerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strLayerName | Name of the layer. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CopyTo(Layer[], Int32)
Copy all collection members to array.
Declaration
public void CopyTo(Layer[] layers, int index)
Parameters
Type | Name | Description |
---|---|---|
Layer[] | layers | The layers. |
System.Int32 | index | The index. |
FindLayerByName(String)
Finds the layer by name.
Declaration
public Layer FindLayerByName(string strLayerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strLayerName | Name of the layer. |
Returns
Type | Description |
---|---|
Layer | The layer with the specified name. |
FindNodeLayer(Node)
Finds the layer that contain given node.
Declaration
public Layer FindNodeLayer(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node. |
Returns
Type | Description |
---|---|
Layer | The layer at the given node. |
GenerateUniqueName(Layer, ref String)
Generates the unique name for given layer.
Declaration
public bool GenerateUniqueName(Layer layer, ref string layerName)
Parameters
Type | Name | Description |
---|---|---|
Layer | layer | The layer. |
System.String | layerName | Name of the layer. |
Returns
Type | Description |
---|---|
System.Boolean | true, if generate unique name otherwise, false. |
GetEnumerator()
Creates the collection enumerator.
Declaration
public override IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Created enumerator |
Overrides
IndexOf(Layer)
Gets the layer index in current collection.
Declaration
public int IndexOf(Layer layer)
Parameters
Type | Name | Description |
---|---|---|
Layer | layer | The layer. |
Returns
Type | Description |
---|---|
System.Int32 | The index. |
Insert(Int32, Layer)
Inserts the layer by specified index.
Declaration
public void Insert(int index, Layer layer)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Layer | layer | The layer. |
OnChangesComplete(CollectionExEventArgs)
Raises the ChangesComplete event.
Declaration
protected override void OnChangesComplete(CollectionExEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
CollectionExEventArgs | evtArgs | The CollectionExEventArgs instance containing the event data. |
Overrides
OnChanging(CollectionExEventArgs)
Raises the Changing event.
Declaration
protected override void OnChanging(CollectionExEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
CollectionExEventArgs | evtArgs | The CollectionExEventArgs instance containing the event data. |
Overrides
OnValidate(ICollection)
Validates given values.
Declaration
protected override void OnValidate(ICollection values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ICollection | values | values to validate |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidCastException |
OnValidate(Object)
Validates given value.
Declaration
protected override void OnValidate(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | value to validate |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidCastException |
RaiseChangesCompleteEvent(CollectionExEventArgs)
Raises ChangesComplete event.
Declaration
protected override void RaiseChangesCompleteEvent(CollectionExEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
CollectionExEventArgs | evtArgs | event args |
Overrides
Remove(Layer)
Removes the specified layer.
Declaration
public void Remove(Layer layer)
Parameters
Type | Name | Description |
---|---|---|
Layer | layer | The layer. |
SplitLayerName(String, Regex)
Splits the name of the layer.
Declaration
protected string[] SplitLayerName(string layerName, Regex regex)
Parameters
Type | Name | Description |
---|---|---|
System.String | layerName | Name of the layer. |
System.Text.RegularExpressions.Regex | regex | The regex. |
Returns
Type | Description |
---|---|
System.String[] | The splitted layer name. |