BindablePropertyKey Klasa

Definicja

Klucz tajny do właściwości BindableProperty używany do implementowania właściwości BindableProperty z ograniczonym dostępem do zapisu.

public sealed class BindablePropertyKey
type BindablePropertyKey = class
Dziedziczenie
System.Object
BindablePropertyKey

Uwagi

W poniższym przykładzie przedstawiono tworzenie elementu BindablePropertyKey. Dostęp do zapisu jest internal , gdy dostęp do odczytu to 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); } 
  }
}

Właściwości

BindableProperty

Pobiera właściwość BindableProperty.

Dotyczy