BindableProperty.CreateDefaultValueDelegate<TDeclarer,TPropertyType> Delegate
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a strongly-typed delegate that creates a default value for a bindable property.
public delegate TPropertyType BindableProperty.CreateDefaultValueDelegate<in TDeclarer,out TPropertyType>(TDeclarer bindable);
type BindableProperty.CreateDefaultValueDelegate<'Declarer, 'PropertyType> = delegate of 'Declarer -> 'PropertyType
Public Delegate Function BindableProperty.CreateDefaultValueDelegate(Of In TDeclarer, Out TPropertyType)(bindable As TDeclarer) As TPropertyType
Type Parameters
- TDeclarer
The type of the declaring object.
This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.- TPropertyType
The type of the property value.
This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.Parameters
- bindable
- TDeclarer
The declaring object instance that owns the property.
Return Value
The default value for the property.
Remarks
This strongly-typed delegate is useful for creating unique default instances for reference types, avoiding shared references between different bindable object instances.