Aracılığıyla paylaş


BindableObject.GetValue(BindableProperty) Method

Definition

Returns the value that is contained in the given bindable property.

public:
 System::Object ^ GetValue(Microsoft::Maui::Controls::BindableProperty ^ property);
public object GetValue (Microsoft.Maui.Controls.BindableProperty property);
member this.GetValue : Microsoft.Maui.Controls.BindableProperty -> obj
Public Function GetValue (property As BindableProperty) As Object

Parameters

property
BindableProperty

The bindable property for which to get the value.

Returns

The value that is contained in the BindableProperty.

Exceptions

Thrown when property is null.

Remarks

GetValue(BindableProperty) and SetValue(BindableProperty, Object) are used to access the values of properties that are implemented by a BindableProperty. That is, application developers typically provide an interface for a bound property by defining a public property whose get accessor casts the result of GetValue(BindableProperty) to the appropriate type and returns it, and whose set accessor uses SetValue(BindableProperty, Object) to set the value on the correct property. Application developers should perform no other steps in the public property that defines the interface of the bound property.

Applies to