BindableProperty.CreateAttached 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
CreateAttached(String, Type, Type, Object, BindingMode, BindableProperty+ValidateValueDelegate, BindableProperty+BindingPropertyChangedDelegate, BindableProperty+BindingPropertyChangingDelegate, BindableProperty+CoerceValueDelegate, BindableProperty+CreateDefaultValueDelegate)
연결된 속성에 대해 BindableProperty 클래스의 새 인스턴스를 만듭니다.
public static Xamarin.Forms.BindableProperty CreateAttached (string propertyName, Type returnType, Type declaringType, object defaultValue, Xamarin.Forms.BindingMode defaultBindingMode = Xamarin.Forms.BindingMode.OneWay, 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 CreateAttached : 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.BindableProperty
매개 변수
- 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
참조 형식에 대한 기본값을 초기화하는 데 사용되는 함수입니다.
반환
새로 만든 연결된 BindableProperty입니다.
적용 대상
CreateAttached<TDeclarer,TPropertyType>(Expression<Func<BindableObject, TPropertyType>>, TPropertyType, BindingMode, BindableProperty.ValidateValueDelegate<TPropertyType>, BindableProperty.BindingPropertyChangedDelegate<TPropertyType>, BindableProperty.BindingPropertyChangingDelegate<TPropertyType>, BindableProperty.CoerceValueDelegate<TPropertyType>, BindableProperty.CreateDefaultValueDelegate<BindableObject, TPropertyType>)
주의
CreateAttached<> (generic) is obsolete as of version 2.1.0 and is no longer supported.
더 이상 사용되지 않습니다. 사용하지 마십시오.
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("CreateAttached<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static Xamarin.Forms.BindableProperty CreateAttached<TDeclarer,TPropertyType> (System.Linq.Expressions.Expression<Func<Xamarin.Forms.BindableObject,TPropertyType>> staticgetter, TPropertyType defaultValue, Xamarin.Forms.BindingMode defaultBindingMode = Xamarin.Forms.BindingMode.OneWay, 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<Xamarin.Forms.BindableObject,TPropertyType> defaultValueCreator = default);
static member CreateAttached : System.Linq.Expressions.Expression<Func<Xamarin.Forms.BindableObject, '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<Xamarin.Forms.BindableObject, 'PropertyType> -> Xamarin.Forms.BindableProperty
형식 매개 변수
- TDeclarer
선언된 개체의 형식입니다.
- TPropertyType
속성의 형식입니다.
매개 변수
- staticgetter
- System.Linq.Expressions.Expression<System.Func<BindableObject,TPropertyType>>
이 BindableProperty를 백업 저장소로 사용하여 속성의 값을 반환하는 정적 메서드를 식별하는 식입니다.
- 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<BindableObject,TPropertyType>
참조 형식에 대한 기본값을 초기화하는 데 사용되는 함수입니다.
반환
새로 만든 BindableProperty입니다.
- 특성
-
System.ComponentModel.EditorBrowsableAttribute System.ObsoleteAttribute
설명
연결된 속성은 부모가 아닌 개체에 바인딩된 바인딩 가능한 속성입니다. 종종 테이블 및 그리드의 자식 항목에 사용됩니다. 여기서 항목의 위치에 대한 데이터는 부모에 의해 유지 관리되지만 자식 항목 자체에서 액세스해야 합니다.