InstanceDependencyProperty.Register Method (String, Type, Type)
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, and the type of owner of the property.
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 _
) As InstanceDependencyProperty
public static InstanceDependencyProperty Register (
string name,
Type propertyType,
Type ownerType
)
Parameters
- name
The name of the property that is associated with the InstanceDependencyProperty field.
- propertyType
The type of the values stored in the property.
- ownerType
The type of the owner of the property.
Return Value
The new InstanceDependencyProperty, 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. |
Remarks
This method returns an InstanceDependencyProperty field without a default value and that can be written to.
Example
The following example registers ConcertProperty as an InstanceDependencyProperty field for Concert, a property of the ConcertChooser class.
private static InstanceDependencyProperty ConcertProperty = InstanceDependencyProperty.Register("Concert", typeof(Concert), typeof(ConcertChooser));
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