Xamarin.Forms Guides | Samples

Xamarin.Forms.BindableProperty.CreateReadOnly Method

Creates a new instance of the BindablePropertyKey class.

Syntax

public static BindablePropertyKey CreateReadOnly (String propertyName, Type returnType, Type declaringType, Object defaultValue, BindingMode defaultBindingMode, BindableProperty+ValidateValueDelegate validateValue, BindableProperty+BindingPropertyChangedDelegate propertyChanged, BindableProperty+BindingPropertyChangingDelegate propertyChanging, BindableProperty+CoerceValueDelegate coerceValue, BindableProperty+CreateDefaultValueDelegate defaultValueCreator)

Parameters

propertyName
The name of the BindableProperty.
returnType
The type of the property.
declaringType
The type of the declaring object.
defaultValue
The default value for the property.
defaultBindingMode
The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.
validateValue
A delegate to be run when a value is set. This parameter is optional. Default is null.
propertyChanged
propertyChanging
coerceValue
A delegate used to coerce the range of a value. This parameter is optional. Default is null.
defaultValueCreator
A Func used to initialize default value for reference types.

Returns

Remarks

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.2.2.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0