BindablePropertyKey Třída

Definice

Tajný klíč k BindableProperty, slouží k implementaci BindableProperty s omezeným přístupem pro zápis.

public sealed class BindablePropertyKey
type BindablePropertyKey = class
Dědičnost
BindablePropertyKey

Poznámky

Následující příklad ukazuje vytvoření BindablePropertyKey. Oprávnění k zápisu je internal v době, kdy je publicpřístup pro čtení .

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

Vlastnosti

BindableProperty

Získá BindableProperty.

Platí pro