BindableProperty.CreateReadOnly メソッド

定義

オーバーロード

CreateReadOnly(String, Type, Type, Object, BindingMode, BindableProperty+ValidateValueDelegate, BindableProperty+BindingPropertyChangedDelegate, BindableProperty+BindingPropertyChangingDelegate, BindableProperty+CoerceValueDelegate, BindableProperty+CreateDefaultValueDelegate)

BindablePropertyKey クラスの新しいインスタンスを作成します。

CreateReadOnly<TDeclarer,TPropertyType>(Expression<Func<TDeclarer, TPropertyType>>, TPropertyType, BindingMode, BindableProperty.ValidateValueDelegate<TPropertyType>, BindableProperty.BindingPropertyChangedDelegate<TPropertyType>, BindableProperty.BindingPropertyChangingDelegate<TPropertyType>, BindableProperty.CoerceValueDelegate<TPropertyType>, BindableProperty.CreateDefaultValueDelegate<TDeclarer, TPropertyType>)
互換性のために残されています。

非推奨。 使用しないでください。

CreateReadOnly(String, Type, Type, Object, BindingMode, BindableProperty+ValidateValueDelegate, BindableProperty+BindingPropertyChangedDelegate, BindableProperty+BindingPropertyChangingDelegate, BindableProperty+CoerceValueDelegate, BindableProperty+CreateDefaultValueDelegate)

BindablePropertyKey クラスの新しいインスタンスを作成します。

public static Xamarin.Forms.BindablePropertyKey CreateReadOnly (string propertyName, Type returnType, Type declaringType, object defaultValue, Xamarin.Forms.BindingMode defaultBindingMode = Xamarin.Forms.BindingMode.OneWayToSource, Xamarin.Forms.BindableProperty.ValidateValueDelegate validateValue = default, Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate propertyChanged = default, Xamarin.Forms.BindableProperty.BindingPropertyChangingDelegate propertyChanging = default, Xamarin.Forms.BindableProperty.CoerceValueDelegate coerceValue = default, Xamarin.Forms.BindableProperty.CreateDefaultValueDelegate defaultValueCreator = default);
static member CreateReadOnly : string * Type * Type * obj * Xamarin.Forms.BindingMode * Xamarin.Forms.BindableProperty.ValidateValueDelegate * Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate * Xamarin.Forms.BindableProperty.BindingPropertyChangingDelegate * Xamarin.Forms.BindableProperty.CoerceValueDelegate * Xamarin.Forms.BindableProperty.CreateDefaultValueDelegate -> Xamarin.Forms.BindablePropertyKey

パラメーター

propertyName
String

BindableProperty の名前。

returnType
Type

プロパティの型。

declaringType
Type

宣言オブジェクトの型。

defaultValue
Object

プロパティの既定値。

defaultBindingMode
BindingMode

BindingMode が指定されていない場合に SetBinding() で使用する BindingMode。 このパラメーターは省略できます。 既定値は BindingMode.OneWay です。

validateValue
BindableProperty.ValidateValueDelegate

値の設定時に実行されるデリゲート。 このパラメーターは省略できます。 既定値は null です。

propertyChanged
BindableProperty.BindingPropertyChangedDelegate

値が変更されたときに実行されるデリゲート。 このパラメーターは省略できます。 既定値は null です。

propertyChanging
BindableProperty.BindingPropertyChangingDelegate

値が変更されるときに実行されるデリゲート。 このパラメーターは省略できます。 既定値は null です。

coerceValue
BindableProperty.CoerceValueDelegate

値の範囲を強制するために使用されるデリゲート。 このパラメーターは省略できます。 既定値は null です。

defaultValueCreator
BindableProperty.CreateDefaultValueDelegate

参照型の既定値を初期化するために使用される関数。

戻り値

適用対象

CreateReadOnly<TDeclarer,TPropertyType>(Expression<Func<TDeclarer, TPropertyType>>, TPropertyType, BindingMode, BindableProperty.ValidateValueDelegate<TPropertyType>, BindableProperty.BindingPropertyChangedDelegate<TPropertyType>, BindableProperty.BindingPropertyChangingDelegate<TPropertyType>, BindableProperty.CoerceValueDelegate<TPropertyType>, BindableProperty.CreateDefaultValueDelegate<TDeclarer, TPropertyType>)

注意事項

CreateReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.

非推奨。 使用しないでください。

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("CreateReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static Xamarin.Forms.BindablePropertyKey CreateReadOnly<TDeclarer,TPropertyType> (System.Linq.Expressions.Expression<Func<TDeclarer,TPropertyType>> getter, TPropertyType defaultValue, Xamarin.Forms.BindingMode defaultBindingMode = Xamarin.Forms.BindingMode.OneWayToSource, Xamarin.Forms.BindableProperty.ValidateValueDelegate<TPropertyType> validateValue = default, Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate<TPropertyType> propertyChanged = default, Xamarin.Forms.BindableProperty.BindingPropertyChangingDelegate<TPropertyType> propertyChanging = default, Xamarin.Forms.BindableProperty.CoerceValueDelegate<TPropertyType> coerceValue = default, Xamarin.Forms.BindableProperty.CreateDefaultValueDelegate<TDeclarer,TPropertyType> defaultValueCreator = default) where TDeclarer : Xamarin.Forms.BindableObject;
static member CreateReadOnly : System.Linq.Expressions.Expression<Func<'Declarer, 'PropertyType>> * 'PropertyType * Xamarin.Forms.BindingMode * Xamarin.Forms.BindableProperty.ValidateValueDelegate<'PropertyType> * Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate<'PropertyType> * Xamarin.Forms.BindableProperty.BindingPropertyChangingDelegate<'PropertyType> * Xamarin.Forms.BindableProperty.CoerceValueDelegate<'PropertyType> * Xamarin.Forms.BindableProperty.CreateDefaultValueDelegate<'Declarer, 'PropertyType (requires 'Declarer :> Xamarin.Forms.BindableObject)> -> Xamarin.Forms.BindablePropertyKey (requires 'Declarer :> Xamarin.Forms.BindableObject)

型パラメーター

TDeclarer

宣言オブジェクトの型。

TPropertyType

プロパティの型。

パラメーター

getter
Expression<Func<TDeclarer,TPropertyType>>

バッキング ストアとしてこの BindableProperty を使用してプロパティのゲッターを識別する式。

defaultValue
TPropertyType

BindableProperty プロパティの既定値。

defaultBindingMode
BindingMode

BindingMode が指定されていない場合に SetBinding() で使用する BindingMode。 このパラメーターは省略できます。 既定値は BindingMode.OneWay です。

validateValue
BindableProperty.ValidateValueDelegate<TPropertyType>

値の設定時に実行されるデリゲート。 このパラメーターは省略できます。 既定値は null です。

propertyChanged
BindableProperty.BindingPropertyChangedDelegate<TPropertyType>

値が変更されたときに実行されるデリゲート。 このパラメーターは省略できます。 既定値は null です。

propertyChanging
BindableProperty.BindingPropertyChangingDelegate<TPropertyType>

値が変更されるときに実行されるデリゲート。 このパラメーターは省略できます。 既定値は null です。

coerceValue
BindableProperty.CoerceValueDelegate<TPropertyType>

値の範囲を強制するために使用されるデリゲート。 このパラメーターは省略できます。 既定値は null です。

defaultValueCreator
BindableProperty.CreateDefaultValueDelegate<TDeclarer,TPropertyType>

参照型の既定値を初期化するために使用される関数。

戻り値

新しく作成された BindablePropertyKey。

属性

注釈

BindablePropertyKey は、SetValue() またはバインディングを使用してプロパティへの書き込みアクセスを制限するために使用されます。 BindableProperty は通常、より広範な読み取りアクセスを提供するためにも定義されます

適用対象