Share via


BindableObject.CoerceValue Metodo

Definizione

Overload

CoerceValue(BindableProperty)

Imposta il valore della proprietà associabile specificata. Questa operazione viene eseguita richiamando BindableProperty.CoerceValueDelegate la proprietà associabile specificata.

CoerceValue(BindablePropertyKey)

Imposta il valore della proprietà associabile specificata. Questa operazione viene eseguita richiamando BindableProperty.CoerceValueDelegate la proprietà associabile specificata.

CoerceValue(BindableProperty)

Imposta il valore della proprietà associabile specificata. Questa operazione viene eseguita richiamando BindableProperty.CoerceValueDelegate la proprietà associabile specificata.

public:
 void CoerceValue(Microsoft::Maui::Controls::BindableProperty ^ property);
public void CoerceValue (Microsoft.Maui.Controls.BindableProperty property);
member this.CoerceValue : Microsoft.Maui.Controls.BindableProperty -> unit
Public Sub CoerceValue (property As BindableProperty)

Parametri

property
BindableProperty

Proprietà associabile per forzare il valore di .

Eccezioni

Viene generata quando property è null.

Generata quando property è di sola lettura.

Generata quando il valore non è valido in base alla logica assegnata in BindableProperty.ValidateValueDelegate.

Commenti

Se BindableProperty.CoerceValueDelegate non è assegnato a, non verrà eseguita alcuna operazione.

Si applica a

CoerceValue(BindablePropertyKey)

Imposta il valore della proprietà associabile specificata. Questa operazione viene eseguita richiamando BindableProperty.CoerceValueDelegate la proprietà associabile specificata.

public:
 void CoerceValue(Microsoft::Maui::Controls::BindablePropertyKey ^ propertyKey);
public void CoerceValue (Microsoft.Maui.Controls.BindablePropertyKey propertyKey);
member this.CoerceValue : Microsoft.Maui.Controls.BindablePropertyKey -> unit
Public Sub CoerceValue (propertyKey As BindablePropertyKey)

Parametri

propertyKey
BindablePropertyKey

Chiave che identifica la proprietà associabile per forzare il valore di .

Eccezioni

Viene generata quando propertyKey è null.

Generata quando la proprietà associabile identificata da propertyKey è di sola lettura.

Generata quando il valore non è valido in base alla logica assegnata in BindableProperty.ValidateValueDelegate.

Commenti

Se BindableProperty.CoerceValueDelegate non è assegnato a, non verrà eseguita alcuna operazione.

Si applica a