BindablePropertyKey Класс

Определение

Секретный ключ для BindableProperty, используемый для реализации BindableProperty с ограниченным доступом для записи.

public sealed class BindablePropertyKey
type BindablePropertyKey = class
Наследование
System.Object
BindablePropertyKey

Комментарии

В следующем примере показано создание BindablePropertyKey. Доступ на запись имеет значение , internal а доступ на чтение — 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); } 
  }
}

Свойства

BindableProperty

Возвращает BindableProperty.

Применяется к