BindableProperty.CreateAttached メソッド

定義

オーバーロード

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

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

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

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

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

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

public static Xamarin.Forms.BindableProperty CreateAttached (string propertyName, Type returnType, Type declaringType, object defaultValue, Xamarin.Forms.BindingMode defaultBindingMode = Xamarin.Forms.BindingMode.OneWay, 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 CreateAttached : 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.BindableProperty

パラメーター

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

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

戻り値

新しく作成された添付 BindableProperty。

適用対象

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

注意事項

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

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

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("CreateAttached<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static Xamarin.Forms.BindableProperty CreateAttached<TDeclarer,TPropertyType> (System.Linq.Expressions.Expression<Func<Xamarin.Forms.BindableObject,TPropertyType>> staticgetter, TPropertyType defaultValue, Xamarin.Forms.BindingMode defaultBindingMode = Xamarin.Forms.BindingMode.OneWay, 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 CreateAttached : 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.BindableProperty

型パラメーター

TDeclarer

宣言オブジェクトの型。

TPropertyType

プロパティの型。

パラメーター

staticgetter
Expression<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>

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

戻り値

新しく作成された BindableProperty。

属性

注釈

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

適用対象