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

適用対象

こちらもご覧ください