[MergableProperty(false)]
public string MyProperty { get; set; }
This topic lists the attributes which are used by the control when retrieving properties’ list from the objects.
The following topics are prerequisites to understanding this topic:
The xamPropertyGrid control analyzes the provided objects(s) using reflection or TypeDescriptor (based on the current PropertyGenerator) and builds the properties list. While retrieving properties the control inspects their attributes to determine if any special handling is required for the property.
The following table explains briefly the supported attributes and how they influence the display and editing of a control’s properties.
The following code snippet demonstrates how to use the MergableProperty
attribute to exclude a specific property from the properties list:
In C#:
[MergableProperty(false)]
public string MyProperty { get; set; }
In Visual Basic:
<MergableProperty(False)> _
Public Property MyProperty() As String
Get
Return i_MyProperty
End Get
Set
i_MyProperty = Value
End Set
End Property
Private i_MyProperty As String
The following topics provide additional information related to this topic.