    

 ## On this page

  

 

 # Class TopologyColorInfo

 Last update: 16.07.2025 

Namespace: [VM.Managed.CAD](VM.Managed.CAD.md)  
Assembly: VMAppCore.dll

This class is to represent the color information of topology.

```csharp
public class TopologyColorInfo

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [TopologyColorInfo](VM.Managed.CAD.TopologyColorInfo.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkedObjects&lt;T&gt;(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### TopologyColorInfo()

Initializes a new instance of the  class

```csharp
public TopologyColorInfo()

```

## Properties

### ColorInfo

Gets the color information.

```csharp
public Dictionary<int, Color> ColorInfo { get; }

```

#### Property Value

[Dictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2)&lt;[int](https://learn.microsoft.com/dotnet/api/system.int32), [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)&gt;

## Methods

### GetSchema()

This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return nullNothingnullptra null reference (Nothing in Visual Basic) (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class.

```csharp
public virtual XmlSchema GetSchema()

```

#### Returns

[XmlSchema](https://learn.microsoft.com/dotnet/api/system.xml.schema.xmlschema)

An  that describes the XML representation of the object that is produced by the  method and consumed by the  method.

### ReadXml(XmlReader)

Generates an object from its XML representation.

```csharp
public virtual void ReadXml(XmlReader reader)

```

#### Parameters

`reader` [XmlReader](https://learn.microsoft.com/dotnet/api/system.xml.xmlreader)

The XmlReader stream from which the object is deserialized.

### SetColor(Builder, int\[\], Color)

Sets the color information.

```csharp
public void SetColor(Builder builder, int[] arrIndexes, Color color)

```

#### Parameters

`builder` [Builder](VM.Managed.CAD.Builder.md)

The owner builder.

`arrIndexes` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[\]

The topology indexes.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)

The color.

### UnsetColor(Builder, int\[\])

Unsets the color information.

```csharp
public void UnsetColor(Builder builder, int[] arrIndexes)

```

#### Parameters

`builder` [Builder](VM.Managed.CAD.Builder.md)

The owner builder.

`arrIndexes` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[\]

The topology indexes.

### WriteXml(XmlWriter)

Converts an object into its XML representation.

```csharp
public virtual void WriteXml(XmlWriter writer)

```

#### Parameters

`writer` [XmlWriter](https://learn.microsoft.com/dotnet/api/system.xml.xmlwriter)

The XmlWriter stream to which the object is serialized.