DependencyProperty::Register Method (String^, Type^, Type^, PropertyMetadata^)
.NET Framework (current version)
Registers a dependency property with the specified property name, property type, owner type, and property metadata.
Assembly: WindowsBase (in WindowsBase.dll)
public: static DependencyProperty^ Register( String^ name, Type^ propertyType, Type^ ownerType, PropertyMetadata^ typeMetadata )
Parameters
- name
-
Type:
System::String^
The name of the dependency property to register.
- propertyType
-
Type:
System::Type^
The type of the property.
- ownerType
-
Type:
System::Type^
The owner type that is registering the dependency property.
- typeMetadata
-
Type:
System.Windows::PropertyMetadata^
Property metadata for the dependency property.
Return Value
Type: System.Windows::DependencyProperty^A dependency property identifier that should be used to set the value of a public static readonly field in your class. That identifier is then used to reference the dependency property later, for operations such as setting its value programmatically or obtaining metadata.
For more information on dependency property registration, see DependencyProperty.
.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: