Xamarin.Forms Guides | Samples

Xamarin.Forms.BindablePropertyKey Class

The secret key to a BindableProperty, used to implement a BindableProperty with restricted write access.

See Also: BindablePropertyKey


public sealed class BindablePropertyKey


The following example shows the creation of a BindablePropertyKey. Write access is internal while read access is public.

C# Example

class Bindable : BindableObject
  internal static readonly BindablePropertyKey FooPropertyKey = 
    BindableProperty.CreateReadOnly<Bindable, string> (w => w.Foo, default(string));

  public static readonly BindableProperty FooProperty = FooPropertyKey.BindableProperty;

  public string Foo {
    get { return (string)GetValue (FooProperty); }
    internal set { SetValue (FooPropertyKey, value); } 


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,

The members of Xamarin.Forms.BindablePropertyKey are listed below.

See Also: Object

Public Properties

BindablePropertyBindableProperty. Gets the BindableProperty.