BindablePropertyKey Класс
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Секретный ключ для 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, связанный с этим ключом. |