다음을 통해 공유


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); } 
  }
}

속성

Name Description
BindableProperty

이 키와 연결된 BindableProperty를 가져옵니다.

적용 대상