Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the value that is contained in the BindableProperty.
public object GetValue(Xamarin.Forms.BindableProperty property);
member this.GetValue : Xamarin.Forms.BindableProperty -> obj
The BindableProperty for which to get the value.
The value that is contained in the BindableProperty.
GetValue(BindableProperty) and SetValue 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 public
property whose get
accessor casts the result of GetValue(BindableProperty) to the appropriate type and returns it, and whose set
accessor uses SetValue 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.
The following example shows how to create a bindable property interface for an implementation that will be provided in the target property when the binding is made at run time.
class MyBindable : BindableObject
{
public static readonly BindableProperty MyProperty =
BindableProperty.Create<MyBindable, string> (w => w.My, default(string));
public string My {
get { return (string)GetValue (MyProperty); }
set { SetValue (MyProperty, value); }
}
}
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in