Share via


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

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Creates a new instance of an InstanceDependencyProperty field, specifying the name of the property with which the InstanceDependencyProperty field is associated, the type of value stored in the property, the type of owner of the property, a default value for the property, and whether the property can be written to.

Namespace: Microsoft.SpeechServer.Dialog
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)

Syntax

'Declaration
Public Shared Function Register ( _
    name As String, _
    propertyType As Type, _
    ownerType As Type, _
    defaultValue As Object, _
    options As InstanceDependencyPropertyOption _
) As InstanceDependencyProperty
public static InstanceDependencyProperty Register (
    string name,
    Type propertyType,
    Type ownerType,
    Object defaultValue,
    InstanceDependencyPropertyOption options
)

Parameters

  • name
    The name of the property with which the InstanceDependencyProperty field is associated.
  • propertyType
    The type of values stored in the property.
  • ownerType
    The type of the owner of the property.
  • defaultValue
    The default value of the property.

Return Value

The new InstanceDependencyProperty field, if successful.

Exceptions

Exception type Condition
ArgumentException

name is null.

name is an empty string.

ArgumentNullException

propertyType is null.

ownerType is null.

ownerType is invalid.

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

InstanceDependencyProperty Class
InstanceDependencyProperty Members
Microsoft.SpeechServer.Dialog Namespace