ElementTypeDescriptor.GetDisplayProperties Method (ModelElement, PropertyDescriptor%)
Returns a collection of property descriptors for all the properties of a model element.
Namespace: Microsoft.VisualStudio.Modeling.Design
Assembly: Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
Syntax
'宣告
Protected Function GetDisplayProperties ( _
requestor As ModelElement, _
ByRef defaultPropertyDescriptor As PropertyDescriptor _
) As PropertyDescriptorCollection
protected PropertyDescriptorCollection GetDisplayProperties(
ModelElement requestor,
ref PropertyDescriptor defaultPropertyDescriptor
)
protected:
PropertyDescriptorCollection^ GetDisplayProperties(
ModelElement^ requestor,
PropertyDescriptor^% defaultPropertyDescriptor
)
member GetDisplayProperties :
requestor:ModelElement *
defaultPropertyDescriptor:PropertyDescriptor byref -> PropertyDescriptorCollection
protected function GetDisplayProperties(
requestor : ModelElement,
defaultPropertyDescriptor : PropertyDescriptor
) : PropertyDescriptorCollection
Parameters
- requestor
Type: Microsoft.VisualStudio.Modeling.ModelElement
The model element to get the properties of.
- defaultPropertyDescriptor
Type: System.ComponentModel.PropertyDescriptor%
A descriptor for the default property of the element, passed by reference.
Return Value
Type: System.ComponentModel.PropertyDescriptorCollection
The collection of property descriptors for all of the properties of the model element.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | requestor is nulla null reference (Nothing in Visual Basic). |
Remarks
If the model element is marked for deletion, then this method returns an empty collection and does not update the defaultPropertyDescriptor.
This method adds or excludes descriptors for domain properties based on the following rules:
Exclude domain properties of the element for which ShouldCreatePropertyDescriptor returns false.
If IncludeOppositeRolePlayerProperties returns true, add a role property for each zero-to-one and one-to-one relationship. Each such role property is generated by calling the CreateRolePlayerPropertyDescriptor method.
If IncludeEmbeddingRelationshipProperties returns true, add properties of the target element of any embedded relationships that do not allow duplicates.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.Modeling.Design Namespace
ShouldCreatePropertyDescriptor
IncludeOppositeRolePlayerProperties