BindableProperty.CreateReadOnly Methode

Definition

Überlädt

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

Erstellt eine neue Instanz der BindablePropertyKey-Klasse.

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

Veraltet. Nicht verwenden.

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

Erstellt eine neue Instanz der BindablePropertyKey-Klasse.

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

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

Gilt für:

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

Achtung

CreateReadOnly<> (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("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)

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 BindablePropertyKey-Klasse.

Attribute
System.ComponentModel.EditorBrowsableAttribute System.ObsoleteAttribute

Hinweise

Ein BindablePropertyKey wird verwendet, um den Schreibzugriff auf eine Eigenschaft einzuschränken, entweder über SetValue() oder eine Bindung. Eine BindableProperty wird in der Regel ebenfalls definiert, um umfassenderen Lesezugriff zu gewähren.

Gilt für: