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)

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.

Returns

Remarks

Attached properties are bindable properties that are bound to an object other than their parent. Often, they are used for child items in tables and grids, where data about the location of an item is maintained by its parent, but must be accessed from the child item itself.

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0