BindableProperty.CreateAttachedReadOnly メソッド

定義

オーバーロード

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

読み取り専用の添付プロパティ用の BindableProperty クラスの新しいインスタンスを作成します。

CreateAttachedReadOnly<TDeclarer,TPropertyType>(Expression<Func<BindableObject, TPropertyType>>, TPropertyType, BindingMode, BindableProperty.ValidateValueDelegate<TPropertyType>, BindableProperty.BindingPropertyChangedDelegate<TPropertyType>, BindableProperty.BindingPropertyChangingDelegate<TPropertyType>, BindableProperty.CoerceValueDelegate<TPropertyType>, BindableProperty.CreateDefaultValueDelegate<BindableObject, TPropertyType>)
古い.

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

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

読み取り専用の添付プロパティ用の BindableProperty クラスの新しいインスタンスを作成します。

public static Xamarin.Forms.BindablePropertyKey CreateAttachedReadOnly (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 CreateAttachedReadOnly : 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
System.String

BindableProperty の名前。

returnType
System.Type

プロパティの型。

declaringType
System.Type

宣言オブジェクトの型。

defaultValue
System.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

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

戻り値

新しく作成された読み取り専用の添付 BindableProperty。

注釈

添付プロパティは、親以外のオブジェクトにバインドされるバインド可能なプロパティです。 多くの場合、これらはテーブルやグリッド内の子アイテムに使用されます。項目の場所に関するデータは親によって管理されますが、子アイテム自体からアクセスする必要があります。

適用対象

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

注意事項

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

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

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("CreateAttachedReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static Xamarin.Forms.BindablePropertyKey CreateAttachedReadOnly<TDeclarer,TPropertyType> (System.Linq.Expressions.Expression<Func<Xamarin.Forms.BindableObject,TPropertyType>> staticgetter, 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<Xamarin.Forms.BindableObject,TPropertyType> defaultValueCreator = default);
static member CreateAttachedReadOnly : System.Linq.Expressions.Expression<Func<Xamarin.Forms.BindableObject, '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<Xamarin.Forms.BindableObject, 'PropertyType> -> Xamarin.Forms.BindablePropertyKey

型パラメーター

TDeclarer

宣言オブジェクトの型。

TPropertyType

プロパティの型。

パラメーター

staticgetter
System.Linq.Expressions.Expression<System.Func<BindableObject,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<BindableObject,TPropertyType>

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

戻り値

新しく作成された BindablePropertyKey。

属性
System.ComponentModel.EditorBrowsableAttribute System.ObsoleteAttribute

適用対象