BindablePropertyKey Classe

Definizione

La chiave privata di una BindableProperty usata per implementare una BindableProperty con accesso limitato in scrittura.

public sealed class BindablePropertyKey
type BindablePropertyKey = class
Ereditarietà
BindablePropertyKey

Commenti

Nell'esempio seguente viene illustrata la creazione di un Oggetto BindablePropertyKey. L'accesso in scrittura è mentre l'accesso in lettura è internalpublic.

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); } 
  }
}

Proprietà

BindableProperty

Ottiene la BindableProperty.

Si applica a