Share via


InstanceDependencyProperty.Register Method (String, Type, Type, Object)

Creates a new instance.

Namespace:  Microsoft.Rtc.Workflow.Activities
Assembly:  Microsoft.Rtc.Workflow (in Microsoft.Rtc.Workflow.dll)

Syntax

'Declaration
Public Shared Function Register ( _
    name As String, _
    propertyType As Type, _
    ownerType As Type, _
    defaultValue As Object _
) As InstanceDependencyProperty
'Usage
Dim name As String
Dim propertyType As Type
Dim ownerType As Type
Dim defaultValue As Object
Dim returnValue As InstanceDependencyProperty

returnValue = InstanceDependencyProperty.Register(name, _
    propertyType, ownerType, defaultValue)
public static InstanceDependencyProperty Register(
    string name,
    Type propertyType,
    Type ownerType,
    Object defaultValue
)

Parameters

  • propertyType
    Type: System.Type
    The type of the values stored.
  • ownerType
    Type: System.Type
    The type that has the property.

Return Value

Type: Microsoft.Rtc.Workflow.Activities.InstanceDependencyProperty

Exceptions

Exception Condition
ArgumentNullException

Thrown if name is null.

ArgumentException

Thrown if propertyType is null.

ArgumentException

Thrown if ownerType is null.

ArgumentException

Thrown if ownerType is not assignable to IInstanceDependencyContainer.

ArgumentException

Dynamic event or property is not supported.

ArgumentException

DefaultValue cannot be cloned.

ArgumentException

DefaultValue is a value type but null.

See Also

Reference

InstanceDependencyProperty Class

InstanceDependencyProperty Members

Register Overload

Microsoft.Rtc.Workflow.Activities Namespace