MergablePropertyAttribute.AllowMerge 속성

정의

이 속성을 속성 창에 있는 다른 개체의 속성과 결합할 수 있는지 여부를 나타내는 값을 가져옵니다.

public:
 property bool AllowMerge { bool get(); };
public bool AllowMerge { get; }
member this.AllowMerge : bool
Public ReadOnly Property AllowMerge As Boolean

속성 값

이 속성을 속성 창에 있는 다른 개체의 속성과 결합할 수 있으면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 확인 하는지 여부를 MyProperty 병합 하기에 적합 합니다. 먼저 코드에 대 한 특성을 가져옵니다 MyProperty 여:

코드 설정 하 여 myAttribute 의 값에는 MergablePropertyAttribute 에서 AttributeCollection 속성 merge에 적합 한지 여부를 확인 합니다.

// Gets the attributes for the property.
AttributeCollection^ attributes = TypeDescriptor::GetProperties( this )[ "MyPropertyProperty" ]->Attributes;

// Checks to see if the property is bindable.
MergablePropertyAttribute^ myAttribute = dynamic_cast<MergablePropertyAttribute^>(attributes[ MergablePropertyAttribute::typeid ]);
if ( myAttribute->AllowMerge )
{
   // Insert code here.
}
// Gets the attributes for the property.
AttributeCollection attributes = 
   TypeDescriptor.GetProperties(this)["MyPropertyProperty"].Attributes;

// Checks to see if the property is bindable.
MergablePropertyAttribute myAttribute = (MergablePropertyAttribute)attributes[typeof(MergablePropertyAttribute)];
if(myAttribute.AllowMerge) {
   // Insert code here.
}
' Gets the attributes for the property.
Dim attributes As AttributeCollection = _
   TypeDescriptor.GetProperties(Me)("MyPropertyProperty").Attributes
       
' Checks to see if the property is bindable.
Dim myAttribute As MergablePropertyAttribute = _
   CType(attributes(GetType(MergablePropertyAttribute)), _
   MergablePropertyAttribute)
If myAttribute.AllowMerge Then
    ' Insert code here.
End If

적용 대상

추가 정보