BindableProperty.CreateAttached Methode

Definition

Überlädt

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

Erstellt eine neue Instanz der BindableProperty-Klasse für eine angefügte Eigenschaft.

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>)
Veraltet.

Veraltet. Nicht verwenden.

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

Erstellt eine neue Instanz der BindableProperty-Klasse für eine angefügte Eigenschaft.

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

Parameter

propertyName
System.String

Der Name der BindableProperty-Klasse.

returnType
System.Type

Den Typ der Eigenschaft.

declaringType
System.Type

Der Typ des deklarierenden Objekts.

defaultValue
System.Object

Der Standardwert für die Eigenschaft.

defaultBindingMode
BindingMode

Das zu verwendende BindingMode-Element für SetBinding(), wenn BindingMode nicht angegeben ist. Dieser Parameter ist optional. Standardmäßig ist BindingMode.OneWay festgelegt.

validateValue
BindableProperty.ValidateValueDelegate

Ein Delegat, der ausgeführt wird, wenn ein Wert festgelegt wird. Dieser Parameter ist optional. Der Standardwert ist NULL.

propertyChanged
BindableProperty.BindingPropertyChangedDelegate

Ein Delegat, der ausgeführt wird, wenn der Wert geändert wurde. Dieser Parameter ist optional. Der Standardwert ist NULL.

propertyChanging
BindableProperty.BindingPropertyChangingDelegate

Ein Delegat, der ausgeführt wird, wenn der Wert geändert wird. Dieser Parameter ist optional. Der Standardwert ist NULL.

coerceValue
BindableProperty.CoerceValueDelegate

Ein Delegat, der dazu verwendet wird, den Bereich eines Wertz zu erzwingen. Dieser Parameter ist optional. Der Standardwert ist NULL.

defaultValueCreator
BindableProperty.CreateDefaultValueDelegate

Ein Func-Delegat zum Initialisieren des Standardwerts für Verweistypen.

Gibt zurück

Eine neu erstellte, angefügte BindableProperty-Klasse.

Gilt für:

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>)

Achtung

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

Veraltet. Nicht verwenden.

[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

Typparameter

TDeclarer

Der Typ des deklarierenden Objekts.

TPropertyType

Den Typ der Eigenschaft.

Parameter

staticgetter
System.Linq.Expressions.Expression<System.Func<BindableObject,TPropertyType>>

Ein Ausdruck, der eine statische Methode identifiziert, die den Wert der Eigenschaft zurückgibt, die diese BindableProperty-Klasse als Sicherungsspeicher verwendet.

defaultValue
TPropertyType

Der Standardwert für BindableProperty.

defaultBindingMode
BindingMode

Das zu verwendende BindingMode-Element für SetBinding(), wenn BindingMode nicht angegeben ist. Dieser Parameter ist optional. Standardmäßig ist BindingMode.OneWay festgelegt.

validateValue
BindableProperty.ValidateValueDelegate<TPropertyType>

Ein Delegat, der ausgeführt wird, wenn ein Wert festgelegt wird. Dieser Parameter ist optional. Der Standardwert ist NULL.

propertyChanged
BindableProperty.BindingPropertyChangedDelegate<TPropertyType>

Ein Delegat, der ausgeführt wird, wenn der Wert geändert wurde. Dieser Parameter ist optional. Der Standardwert ist NULL.

propertyChanging
BindableProperty.BindingPropertyChangingDelegate<TPropertyType>

Ein Delegat, der ausgeführt wird, wenn der Wert geändert wird. Dieser Parameter ist optional. Der Standardwert ist NULL.

coerceValue
BindableProperty.CoerceValueDelegate<TPropertyType>

Ein Delegat, der dazu verwendet wird, den Bereich eines Wertz zu erzwingen. Dieser Parameter ist optional. Der Standardwert ist NULL.

defaultValueCreator
BindableProperty.CreateDefaultValueDelegate<BindableObject,TPropertyType>

Ein Func-Delegat zum Initialisieren des Standardwerts für Verweistypen.

Gibt zurück

Eine neu erstellte BindableProperty-Klasse.

Attribute
System.ComponentModel.EditorBrowsableAttribute System.ObsoleteAttribute

Hinweise

Angefügte Eigenschaften sind bindbare Eigenschaften, die an ein anderes Objekt als das übergeordnete Objekt gebunden sind. Häufig werden sie für untergeordnete Elemente in Tabellen und Rastern verwendet, bei denen Daten über den Speicherort eines Elements vom übergeordneten Element verwaltet werden, aber vom untergeordneten Element selbst aus zugegriffen werden müssen.

Gilt für: