Sdílet prostřednictvím


BindableProperty.Create Metoda

Definice

Přetížení

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

Vytvoří novou instanci Třídy BindableProperty.

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>)
Zastaralé.

Zastaralé Nepoužívat.

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

Vytvoří novou instanci Třídy BindableProperty.

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

Parametry

propertyName
System.String

Název BindableProperty.

returnType
System.Type

Typ proměnné

declaringType
System.Type

Typ deklarujícího objektu.

defaultValue
System.Object

Výchozí hodnota vlastnosti.

defaultBindingMode
BindingMode

BindingMode k použití v SetBinding(), pokud není zadána žádná BindingMode. Tento parametr je volitelný. Výchozí hodnota je BindingMode.OneWay.

validateValue
BindableProperty.ValidateValueDelegate

Delegát, který se má spustit při nastavení hodnoty. Tento parametr je volitelný. Výchozí hodnota je null.

propertyChanged
BindableProperty.BindingPropertyChangedDelegate

Delegát, který se má spustit, když se hodnota změnila. Tento parametr je volitelný. Výchozí hodnota je null.

propertyChanging
BindableProperty.BindingPropertyChangingDelegate

Delegát, který se spustí, když se hodnota změní. Tento parametr je volitelný. Výchozí hodnota je null.

coerceValue
BindableProperty.CoerceValueDelegate

Delegát použitý k převodu rozsahu hodnoty. Tento parametr je volitelný. Výchozí hodnota je null.

defaultValueCreator
BindableProperty.CreateDefaultValueDelegate

Func slouží k inicializaci výchozí hodnoty pro odkazové typy.

Návraty

Nově vytvořený BindableProperty.

Platí pro

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

Upozornění

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

Zastaralé Nepoužívat.

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

Parametry typu

TDeclarer

Typ deklarujícího objektu.

TPropertyType

Typ proměnné

Parametry

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

Výraz identifikující getter pro vlastnost pomocí tohoto BindableProperty jako záložní úložiště.

defaultValue
TPropertyType

Výchozí hodnota pro BindableProperty.

defaultBindingMode
BindingMode

BindingMode k použití v SetBinding(), pokud není zadána žádná BindingMode. Tento parametr je volitelný. Výchozí hodnota je BindingMode.OneWay.

validateValue
BindableProperty.ValidateValueDelegate<TPropertyType>

Delegát, který se má spustit při nastavení hodnoty. Tento parametr je volitelný. Výchozí hodnota je null.

propertyChanged
BindableProperty.BindingPropertyChangedDelegate<TPropertyType>

Delegát, který se má spustit, když se hodnota změnila. Tento parametr je volitelný. Výchozí hodnota je null.

propertyChanging
BindableProperty.BindingPropertyChangingDelegate<TPropertyType>

Delegát, který se spustí, když se hodnota změní. Tento parametr je volitelný. Výchozí hodnota je null.

coerceValue
BindableProperty.CoerceValueDelegate<TPropertyType>

Delegát použitý k převodu rozsahu hodnoty. Tento parametr je volitelný. Výchozí hodnota je null.

defaultValueCreator
BindableProperty.CreateDefaultValueDelegate<TDeclarer,TPropertyType>

Func slouží k inicializaci výchozí hodnoty pro odkazové typy.

Návraty

Nově vytvořený BindableProperty.

Atributy
System.ComponentModel.EditorBrowsableAttribute System.ObsoleteAttribute

Platí pro