BindablePropertyKey Classe

Définition

Clé secrète d’une BindableProperty, utilisée pour implémenter une BindableProperty avec un accès en écriture limité.

public sealed class BindablePropertyKey
type BindablePropertyKey = class
Héritage
System.Object
BindablePropertyKey

Remarques

L’exemple suivant montre la création d’un BindablePropertyKey. L’accès en écriture est internal alors que l’accès en lecture est 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); } 
  }
}

Propriétés

BindableProperty

Obtient la BindableProperty.

S’applique à