MergablePropertyAttribute(Boolean) 생성자

정의

MergablePropertyAttribute 클래스의 새 인스턴스를 초기화합니다.

public:
 MergablePropertyAttribute(bool allowMerge);
public MergablePropertyAttribute(bool allowMerge);
new System.ComponentModel.MergablePropertyAttribute : bool -> System.ComponentModel.MergablePropertyAttribute
Public Sub New (allowMerge As Boolean)

매개 변수

allowMerge
Boolean

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

예제

다음 예제에서는 병합에 적절 한 속성을 표시 합니다. 이 코드는 새 MergablePropertyAttribute값을 만들고, 해당 값을 MergablePropertyAttribute.Yes설정하며, 속성에 바인딩합니다.

public:
   [MergableProperty(true)]
   property int MyProperty 
   {
      int get()
      {
         // Insert code here.
         return 0;
      }
      void set( int value )
      {
         // Insert code here.
      }
   }

[MergableProperty(true)]
public int MyProperty
{
    get =>
        // Insert code here.
        0;
    set
    {
        // Insert code here.
    }
}
<MergableProperty(True)> _    
Public Property MyProperty() As Integer
    Get
        ' Insert code here.
        Return 0
    End Get
    Set
        ' Insert code here.
    End Set 
End Property

적용 대상

추가 정보