BindablePropertyKey Klasse

Definition

Der geheime Schlüssel zu einer BindableProperty-Klasse, der zum Implementieren einer BindableProperty-Klasse mit eingeschränktem Schreibzugriff verwendet wird.

public sealed class BindablePropertyKey
type BindablePropertyKey = class
Vererbung
BindablePropertyKey

Hinweise

The following example shows the creation of a BindablePropertyKey. Der Schreibzugriff erfolgt internal , während der Lesezugriff ist public.

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

Eigenschaften

BindableProperty

Ruft die BindableProperty-Klasse ab.

Gilt für: