BindableProperty.Create Methode

Definition

Überlädt

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

Erstellt eine neue Instanz der BindableProperty-Klasse.

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

Veraltet. Nicht verwenden.

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

Erstellt eine neue Instanz der BindableProperty-Klasse.

public static Xamarin.Forms.BindableProperty Create (string propertyName, Type returnType, Type declaringType, object defaultValue = default, 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 Create : 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 BindableProperty-Klasse.

Gilt für:

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

Achtung

Create<> (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("Create<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static Xamarin.Forms.BindableProperty Create<TDeclarer,TPropertyType> (System.Linq.Expressions.Expression<Func<TDeclarer,TPropertyType>> getter, 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<TDeclarer,TPropertyType> defaultValueCreator = default) where TDeclarer : Xamarin.Forms.BindableObject;
static member Create : 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.BindableProperty (requires 'Declarer :> Xamarin.Forms.BindableObject)

Typparameter

TDeclarer

Der Typ des deklarierenden Objekts.

TPropertyType

Den Typ der Eigenschaft.

Parameter

getter
System.Linq.Expressions.Expression<System.Func<TDeclarer,TPropertyType>>

Ein Ausdruck, der den Getter der Eigenschaft identifiziert, 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<TDeclarer,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

Gilt für: