BindableObject.CoerceValue Method

Definition

Overloads

CoerceValue(BindableProperty)

Coerces the value of the specified bindable property. This is done by invoking BindableProperty.CoerceValueDelegate of the specified bindable property.

CoerceValue(BindablePropertyKey)

Coerces the value of the specified bindable property. This is done by invoking BindableProperty.CoerceValueDelegate of the specified bindable property.

CoerceValue(BindableProperty)

Source:
BindableObject.cs
Source:
BindableObject.cs

Coerces the value of the specified bindable property. This is done by invoking BindableProperty.CoerceValueDelegate of the specified bindable property.

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)

Parameters

property
BindableProperty

The bindable property to coerce the value of.

Exceptions

Thrown when property is null.

Thrown when property is read-only.

Thrown when the value is invalid according to the assigned logic in BindableProperty.ValidateValueDelegate.

Remarks

If BindableProperty.CoerceValueDelegate is not assigned to, nothing will happen.

Applies to

CoerceValue(BindablePropertyKey)

Source:
BindableObject.cs
Source:
BindableObject.cs

Coerces the value of the specified bindable property. This is done by invoking BindableProperty.CoerceValueDelegate of the specified bindable property.

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)

Parameters

propertyKey
BindablePropertyKey

The key that identifies the bindable property to coerce the value of.

Exceptions

Thrown when propertyKey is null.

Thrown when the bindable property identified by propertyKey is read-only.

Thrown when the value is invalid according to the assigned logic in BindableProperty.ValidateValueDelegate.

Remarks

If BindableProperty.CoerceValueDelegate is not assigned to, nothing will happen.

Applies to