BindablePropertyKey Класс
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Секретный ключ для BindableProperty, используемый для реализации BindableProperty с ограниченным доступом для записи.
public ref class BindablePropertyKey sealed
public sealed class BindablePropertyKey
type BindablePropertyKey = class
Public NotInheritable Class BindablePropertyKey
- Наследование
-
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. |