Name

MergablePropertyAttribute

Synopsis

This attribute adorns a property to indicate whether it can be merged with the properties owned by other classes in a designer that supports a set of objects. The AllowMerge property returns this state.

For example, the System.Windows.Forms.PropertyGrid can bind to several objects to display the common properties. If any one of these properties is marked with a MergableProperty(false) attribute, that property will not appear in the grid, even if all objects provide a property of that name and signature.


public sealed class MergablePropertyAttribute : Attribute {

// Public Constructors

   public MergablePropertyAttribute(bool allowMerge);

// Public Static Fields

   public static readonly MergablePropertyAttribute Default;  // =System.ComponentModel.MergablePropertyAttribute

   public static readonly MergablePropertyAttribute No;  // =System.ComponentModel.MergablePropertyAttribute

   public static readonly MergablePropertyAttribute Yes;  // =System.ComponentModel.MergablePropertyAttribute

                  // Public Instance Properties

   public bool AllowMerge{get; }

// Public Instance Methods

   public override bool Equals(object obj);  // overrides Attribute

   public override int GetHashCode();  // overrides Attribute

   public override bool IsDefaultAttribute();  // overrides Attribute

}

Hierarchy

System.Object System.Attribute MergablePropertyAttribute

Valid On

All

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.