Class DependencyPropertyKey
Provides a dependency property identifier for limited write access to a read-only dependency property.
Inheritance
Inherited Members
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public sealed class DependencyPropertyKey
Remarks
This object can have a transient state upon creation where the _dp field can be null until initialized. However in use _dp needs to always be non-null. Otherwise it is treated as a key that can't unlock anything. (When needed, this property is available via the static constant NoAccess.
Properties
| Improve this Doc View SourceDependencyProperty
Gets the dependency property identifier associated with this specialized read-only dependency property identifier.
Declaration
public DependencyProperty DependencyProperty { get; }
Property Value
Type | Description |
---|---|
DependencyProperty |
Methods
| Improve this Doc View SourceOverrideMetadata(Type, PropertyMetadata)
Overrides the metadata of a read-only dependency property that is represented by this dependency property identifier.
Declaration
public void OverrideMetadata(Type forType, PropertyMetadata typeMetadata)
Parameters
Type | Name | Description |
---|---|---|
System.Type | forType | The type on which this dependency property exists and metadata should be overridden. |
PropertyMetadata | typeMetadata | Metadata supplied for this type. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Attempted metadata override on a read-write dependency property (cannot be done using this signature). |
System.ArgumentException | Metadata was already established for the property as it exists on the provided type. |