Sdílet prostřednictvím


BindablePropertyKey Třída

Definice

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

public ref class BindablePropertyKey sealed
public sealed class BindablePropertyKey
type BindablePropertyKey = class
Public NotInheritable Class BindablePropertyKey
Dědičnost
BindablePropertyKey

Poznámky

Následující příklad ukazuje vytvoření BindablePropertyKey. Přístup k zápisu je internal , zatímco přístup pro čtení je 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); } 
  }
}

Vlastnosti

BindableProperty

Získá BindableProperty.

Platí pro