BindableProperty.CreateReadOnly 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
CreateReadOnly(String, Type, Type, Object, BindingMode, BindableProperty+ValidateValueDelegate, BindableProperty+BindingPropertyChangedDelegate, BindableProperty+BindingPropertyChangingDelegate, BindableProperty+CoerceValueDelegate, BindableProperty+CreateDefaultValueDelegate)
BindablePropertyKey 클래스의 새 인스턴스를 만듭니다.
public static Xamarin.Forms.BindablePropertyKey CreateReadOnly (string propertyName, Type returnType, Type declaringType, object defaultValue, Xamarin.Forms.BindingMode defaultBindingMode = Xamarin.Forms.BindingMode.OneWayToSource, Xamarin.Forms.BindableProperty.ValidateValueDelegate validateValue = default, Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate propertyChanged = default, Xamarin.Forms.BindableProperty.BindingPropertyChangingDelegate propertyChanging = default, Xamarin.Forms.BindableProperty.CoerceValueDelegate coerceValue = default, Xamarin.Forms.BindableProperty.CreateDefaultValueDelegate defaultValueCreator = default);
static member CreateReadOnly : string * Type * Type * obj * Xamarin.Forms.BindingMode * Xamarin.Forms.BindableProperty.ValidateValueDelegate * Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate * Xamarin.Forms.BindableProperty.BindingPropertyChangingDelegate * Xamarin.Forms.BindableProperty.CoerceValueDelegate * Xamarin.Forms.BindableProperty.CreateDefaultValueDelegate -> Xamarin.Forms.BindablePropertyKey
매개 변수
- propertyName
- System.String
BindableProperty의 이름입니다.
- returnType
- System.Type
속성의 형식입니다.
- declaringType
- System.Type
선언된 개체의 형식입니다.
- defaultValue
- System.Object
속성의 기본값입니다.
- defaultBindingMode
- BindingMode
BindingMode가 없는 경우 SetBinding()에서 사용할 BindingMode입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 BindingMode.OneWay입니다.
- validateValue
- BindableProperty.ValidateValueDelegate
값이 설정되면 실행할 대리자입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 null입니다.
- propertyChanged
- BindableProperty.BindingPropertyChangedDelegate
값이 변경되면 실행할 대리자입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 null입니다.
- propertyChanging
- BindableProperty.BindingPropertyChangingDelegate
값이 변경되면 실행할 대리자입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 null입니다.
- coerceValue
- BindableProperty.CoerceValueDelegate
값의 범위를 강제하는 데 사용되는 대리자입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 null입니다.
- defaultValueCreator
- BindableProperty.CreateDefaultValueDelegate
참조 형식에 대한 기본값을 초기화하는 데 사용되는 함수입니다.
반환
적용 대상
CreateReadOnly<TDeclarer,TPropertyType>(Expression<Func<TDeclarer, TPropertyType>>, TPropertyType, BindingMode, BindableProperty.ValidateValueDelegate<TPropertyType>, BindableProperty.BindingPropertyChangedDelegate<TPropertyType>, BindableProperty.BindingPropertyChangingDelegate<TPropertyType>, BindableProperty.CoerceValueDelegate<TPropertyType>, BindableProperty.CreateDefaultValueDelegate<TDeclarer, TPropertyType>)
주의
CreateReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.
더 이상 사용되지 않습니다. 사용하지 마십시오.
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("CreateReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static Xamarin.Forms.BindablePropertyKey CreateReadOnly<TDeclarer,TPropertyType> (System.Linq.Expressions.Expression<Func<TDeclarer,TPropertyType>> getter, TPropertyType defaultValue, Xamarin.Forms.BindingMode defaultBindingMode = Xamarin.Forms.BindingMode.OneWayToSource, Xamarin.Forms.BindableProperty.ValidateValueDelegate<TPropertyType> validateValue = default, Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate<TPropertyType> propertyChanged = default, Xamarin.Forms.BindableProperty.BindingPropertyChangingDelegate<TPropertyType> propertyChanging = default, Xamarin.Forms.BindableProperty.CoerceValueDelegate<TPropertyType> coerceValue = default, Xamarin.Forms.BindableProperty.CreateDefaultValueDelegate<TDeclarer,TPropertyType> defaultValueCreator = default) where TDeclarer : Xamarin.Forms.BindableObject;
static member CreateReadOnly : System.Linq.Expressions.Expression<Func<'Declarer, 'PropertyType>> * 'PropertyType * Xamarin.Forms.BindingMode * Xamarin.Forms.BindableProperty.ValidateValueDelegate<'PropertyType> * Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate<'PropertyType> * Xamarin.Forms.BindableProperty.BindingPropertyChangingDelegate<'PropertyType> * Xamarin.Forms.BindableProperty.CoerceValueDelegate<'PropertyType> * Xamarin.Forms.BindableProperty.CreateDefaultValueDelegate<'Declarer, 'PropertyType (requires 'Declarer :> Xamarin.Forms.BindableObject)> -> Xamarin.Forms.BindablePropertyKey (requires 'Declarer :> Xamarin.Forms.BindableObject)
형식 매개 변수
- TDeclarer
선언된 개체의 형식입니다.
- TPropertyType
속성의 형식입니다.
매개 변수
- getter
- System.Linq.Expressions.Expression<System.Func<TDeclarer,TPropertyType>>
이 BindableProperty를 백업 저장소로 사용하여 속성에 대한 getter를 식별하는 식입니다.
- defaultValue
- TPropertyType
BindableProperty에 대한 기본값입니다.
- defaultBindingMode
- BindingMode
BindingMode가 없는 경우 SetBinding()에서 사용할 BindingMode입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 BindingMode.OneWay입니다.
- validateValue
- BindableProperty.ValidateValueDelegate<TPropertyType>
값이 설정되면 실행할 대리자입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 null입니다.
- propertyChanged
- BindableProperty.BindingPropertyChangedDelegate<TPropertyType>
값이 변경되면 실행할 대리자입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 null입니다.
- propertyChanging
- BindableProperty.BindingPropertyChangingDelegate<TPropertyType>
값이 변경되면 실행할 대리자입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 null입니다.
값의 범위를 강제하는 데 사용되는 대리자입니다. 이 매개 변수는 선택적 요소입니다. 기본값은 null입니다.
- defaultValueCreator
- BindableProperty.CreateDefaultValueDelegate<TDeclarer,TPropertyType>
참조 형식에 대한 기본값을 초기화하는 데 사용되는 함수입니다.
반환
새로 만든 BindablePropertyKey입니다.
- 특성
-
System.ComponentModel.EditorBrowsableAttribute System.ObsoleteAttribute
설명
BindablePropertyKey는 SetValue() 또는 바인딩을 통해 속성에 대한 쓰기 액세스를 제한하는 데 사용됩니다. BindableProperty는 일반적으로 더 광범위한 읽기 권한을 부여하기 위해 정의됩니다.