    

 ## On this page

  

 

 # Class ContactConstraint&lt;TProperty\\&gt;

 Last update: 16.07.2025 

Namespace: [VM.Managed.DAFUL.Contact](VM.Managed.DAFUL.Contact.md)  
Assembly: VMDCt.dll

This class is to represent the contact constraint.

```csharp
public abstract class ContactConstraint<TProperty> : Connector<TProperty>, IObservableObject, IDisposableObject, ILinkable, ILinkContainerEvent, IVerifiable, IHistoryObjectSerializable, IAttributeContainer, IContainer, IEntity, IEntityBase, IObjectBase, IObject, ILinkContainer, IOwned, IHasID, IEventProvider, IHasKeyObject, IHasName, IEnabled, IHasComment, IVisible, IDocumentOwner, INamed, INavigatorItem, IVisible, IMultiChangable, IHasProperty, IGroup, IDraw, IDrawIcon, IReferencable, ITransformable, IConnector, IEntityRelation, IGenerable, IArgument, IReportable, IFlip, IEnableForSimulationScenario where TProperty : PropertyContactConstraint, new()

```

#### Type Parameters

`TProperty`

The type of the property.

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← ObservableObject ← LinkableBase ← ObjectBase ← Object&lt;EntityEventCore&gt; ← ContainerObject&lt;EntityEventCore&gt; ← EntityBase ← Entity&lt;TProperty&gt; ← Connector&lt;TProperty&gt; ← [ContactConstraint&lt;TProperty&gt;](VM.Managed.DAFUL.Contact.ContactConstraint-1.md)

#### Implements

IObservableObject, IDisposableObject, ILinkable, ILinkContainerEvent, IVerifiable, IHistoryObjectSerializable, IAttributeContainer, IContainer, IEntity, IEntityBase, IObjectBase, IObject, ILinkContainer, IOwned, IHasID, IEventProvider, IHasKeyObject, IHasName, IEnabled, IHasComment, IVisible, IDocumentOwner, INamed, INavigatorItem, IVisible, IMultiChangable, IHasProperty, IGroup, IDraw, IDrawIcon, IReferencable, ITransformable, IConnector, IEntityRelation, IGenerable, IArgument, IReportable, IFlip, IEnableForSimulationScenario

#### Inherited Members

Connector&lt;TProperty&gt;.Initialize(Unit.ConvertFactor), Connector&lt;TProperty&gt;.GetTargetListForUpdate(), Connector&lt;TProperty&gt;.Verify(VerifiedResult), Connector&lt;TProperty&gt;.LinkRequestUpdate(object, LinkEventArgs), Connector&lt;TProperty&gt;.GetModelNavigatorInformationImpl(XmlDocument, XmlElement, bool), Connector&lt;TProperty&gt;.Draw(Canvas), Connector&lt;TProperty&gt;.ReDraw(), Connector&lt;TProperty&gt;.FindLocal(string), Connector&lt;TProperty&gt;.Instantiate(Reference, Canvas), Connector&lt;TProperty&gt;.MakeReference(LinkedList&lt;Reference&gt;), Connector&lt;TProperty&gt;.MakeReferenceImpl(LinkedList&lt;Reference&gt;), Connector&lt;TProperty&gt;.GetLayerImpl(), Connector&lt;TProperty&gt;.SetLayerImpl(Layer), Connector&lt;TProperty&gt;.SwitchImpl(), Connector&lt;TProperty&gt;.BaseMarker, Connector&lt;TProperty&gt;.ActionMarker, Connector&lt;TProperty&gt;.ConnectorReferenceMarker, Connector&lt;TProperty&gt;.PreventDuplicatedRBE, Connector&lt;TProperty&gt;.Generable, Connector&lt;TProperty&gt;.HasLayerExplicitly, Connector&lt;TProperty&gt;.Hide, Connector&lt;TProperty&gt;.Referencable, Connector&lt;TProperty&gt;.Visible, Connector&lt;TProperty&gt;.Layer, Connector&lt;TProperty&gt;.ReferenceType, Connector&lt;TProperty&gt;.ArgumentType, Connector&lt;TProperty&gt;.CanWriteToOutFileImpl, Connector&lt;TProperty&gt;.ReportTypeImpl, Connector&lt;TProperty&gt;.CanSwitchImpl, Entity&lt;TProperty&gt;.Initialize(Unit.ConvertFactor), Entity&lt;TProperty&gt;.GetUnnamedObjectName(object), Entity&lt;TProperty&gt;.FindLocal(string), Entity&lt;TProperty&gt;.Property, EntityBase.Initialize(Unit.ConvertFactor), EntityBase.SetOldNameWithNewEntity(ObjectBase, ObjectBase), EntityBase.PropertyRequestUpdate(object, LinkEventArgs), EntityBase.OnDeserializationForAttribute(), EntityBase.OnUpdatePropertyImpl(Property, LinkEventArgs), EntityBase.LinkRequestDestroying(object, LinkEventArgs), EntityBase.GetModelNavigatorInformationImpl(XmlDocument, XmlElement, bool), EntityBase.FixUp(ObjectBase), EntityBase.FindLocal(string), EntityBase.WriteTemplateImpl(XmlWriter), EntityBase.ReadTemplateImpl(XmlReader), EntityBase.LinkAddedToDocument(object, AddToDocEventArgs), EntityBase.OnDeserialization(object), EntityBase.Name, EntityBase.FullName, EntityBase.NonSymmetricName, EntityBase.DisplayName, EntityBase.IsEnabled, EntityBase.Comment, EntityBase.HasLayerExplicitly, EntityBase.UntypedProperty, EntityBase.IsFileProperty, EntityBase.Layer, EntityBase.IsVisible, ContainerObject&lt;EntityEventCore&gt;.Find(string), ContainerObject&lt;EntityEventCore&gt;.FindLocal(string), ContainerObject&lt;EntityEventCore&gt;.GetUnnamedObjectName(object), ContainerObject&lt;EntityEventCore&gt;.GetNewEntityName(string), ContainerObject&lt;EntityEventCore&gt;.GetNewEntityName(string, bool, int), ContainerObject&lt;EntityEventCore&gt;.GetNewEntityName(string, bool, int, int), Object&lt;EntityEventCore&gt;.GetKey(), Object&lt;EntityEventCore&gt;.Initialize(Unit.ConvertFactor), Object&lt;EntityEventCore&gt;.SetIconColor(Canvas), Object&lt;EntityEventCore&gt;.OnDeserialization(object), Object&lt;EntityEventCore&gt;.CustomGetObjectData(SerializationInfo, StreamingContext), Object&lt;EntityEventCore&gt;.RollbackEvent(), Object&lt;EntityEventCore&gt;.OnDeserializedCore(object), Object&lt;EntityEventCore&gt;.Key, Object&lt;EntityEventCore&gt;.UntypedEventCore, Object&lt;EntityEventCore&gt;.EventCore, Object&lt;EntityEventCore&gt;.Attributes, ObjectBase.ReplaceEventCore(ObjectEventCore), ObjectBase.SetModifiedCore(ModifiedResult.ModifiedType), ObjectBase.AddPostDeserialize(StreamingContext), ObjectBase.LinkAddedToDocumentCore(IOwned, bool), ObjectBase.SetModified(ModifiedResult.ModifiedType), ObjectBase.SetModified(), ObjectBase.SetModified(ModifiedResult.ModifiedType, IDocument), ObjectBase.DestroyObject(object, LinkEventArgs), ObjectBase.DestroyObject(DestroyEventArgs), ObjectBase.DestroyObject(), ObjectBase.Initialize(Unit.ConvertFactor), ObjectBase.FixUp(ObjectBase), ObjectBase.DoWorkAfterUpdateContents(), ObjectBase.SetOldNameWithNewEntity(ObjectBase, ObjectBase), ObjectBase.SetIconColor(Canvas), ObjectBase.RemoveFromCreatedList(), ObjectBase.PostAddToDocument(), ObjectBase.PostRemoveFromDocument(Document), ObjectBase.GetArgumentList(LinkedList&lt;ObjectBase&gt;), ObjectBase.ResetInvalidEntity(), ObjectBase.OnDeserialization(object), ObjectBase.IsSerializableEvent(Delegate), ObjectBase.CustomGetObjectData(SerializationInfo, StreamingContext), ObjectBase.CheckAndUpdateLink(HashSet&lt;ObjectBase&gt;), ObjectBase.Verify(VerifiedResult), ObjectBase.ConnectProxy(), ObjectBase.RollbackEvent(), ObjectBase.LinkRequestUpdating(object, LinkEventArgs), ObjectBase.LinkRequestUpdate(object, LinkEventArgs), ObjectBase.LinkRequestDestroying(object, LinkEventArgs), ObjectBase.LinkRequestDestroy(object, LinkEventArgs), ObjectBase.LinkAddedToDocument(object, AddToDocEventArgs), ObjectBase.LinkRemovedFromDocument(object, RemoveFromDocEventArgs), ObjectBase.DisposeManagedResources(), ObjectBase.GetDestroyEventExtraData(), ObjectBase.OnLinkReserved(ILink, object, EventArgs), ObjectBase.CreateEntityWhenUpdateContents(Action), ObjectBase.GetObjectByKey(UIntPtr), ObjectBase.FindObjectOnXmlDeserialize(string), ObjectBase.UpdateContents(XmlReader, ObjectBase, string), ObjectBase.UpdateContents(XmlReader, ObjectBase), ObjectBase.UpdateContents(string, string), ObjectBase.UpdateContents(string), ObjectBase.SetFlagWhenXMLFile(string, bool), ObjectBase.IsEqualArray&lt;T&gt;(T\[\], T\[\]), ObjectBase.IsEqualList(List&lt;double&gt;, List&lt;double&gt;), ObjectBase.SetContainer(IOwned, bool), ObjectBase.GetTargetListForUpdate(), ObjectBase.SkipUpdateObjectImpl(), ObjectBase.raise\_OnUpdating(object, LinkEventArgs), ObjectBase.raise\_OnUpdate(object, LinkEventArgs), ObjectBase.raise\_OnDestroying(object, LinkEventArgs), ObjectBase.raise\_OnDestroy(object, LinkEventArgs), ObjectBase.raise\_Destroying(object, Identifier), ObjectBase.raise\_OnAdded(object, AddToDocEventArgs), ObjectBase.raise\_OnRemoved(object, RemoveFromDocEventArgs), ObjectBase.raise\_OnContentsUpdated(object, EventArgs), ObjectBase.Dispose(bool), ObjectBase.SkipModified, ObjectBase.ClearChildInfoBeforeDeserialize, ObjectBase.KeyImpl, ObjectBase.ID, ObjectBase.TopologyEntityTypeName, ObjectBase.ObjectStateForCircularError, ObjectBase.ObjectState, ObjectBase.IsChildExternable, ObjectBase.IsExternable, ObjectBase.Container, ObjectBase.Owner, ObjectBase.Document, ObjectBase.UntypedEventCore, ObjectBase.KernelKey, ObjectBase.Key, ObjectBase.OnContentsUpdated, ObjectBase.OnRemoved, ObjectBase.OnAdded, ObjectBase.Destroying, ObjectBase.OnDestroy, ObjectBase.OnDestroying, ObjectBase.OnUpdate, ObjectBase.OnUpdating, LinkableBase.OnDeserialization(object), ObservableObject.Dispose(), ObservableObject.RaisePropertyChanged(string), ObservableObject.RaisePropertyChanged(string, object, object), ObservableObject.Dispose(bool), ObservableObject.DisposeManagedResources(), ObservableObject.DisposeUnmanagedResources(), ObservableObject.IsDisposed, ObservableObject.TryDisposing, ObservableObject.Disposed, ObservableObject.Disposing, ObservableObject.PropertyChanged

#### 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

### ContactConstraint()

Initializes a new instance of the  class.

```csharp
protected ContactConstraint()

```

### ContactConstraint(string)

Initializes a new instance of the  class.

```csharp
public ContactConstraint(string strName)

```

#### Parameters

`strName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of the \[contact constraint\].

## Properties

### TargetType

Gets the type of the target.

```csharp
public abstract string TargetType { get; }

```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Use

Gets a value indicating whether use this instance.

```csharp
public abstract bool Use { get; }

```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Methods

### GetModelNavigatorInformationImpl(XmlDocument, XmlElement, bool)

```csharp
protected override bool GetModelNavigatorInformationImpl(XmlDocument xmlDom, XmlElement xmlEle, bool bHasChild)

```

#### Parameters

`xmlDom` [XmlDocument](https://learn.microsoft.com/dotnet/api/system.xml.xmldocument)

The XmlDocument for object.

`xmlEle` [XmlElement](https://learn.microsoft.com/dotnet/api/system.xml.xmlelement)

The XmlElement for object.

`bHasChild` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

if set to `true` \[has child\].

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if success; otherwise, `false`.