共用方式為


Properties of elements on UML component diagrams

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

In a UML component diagram, each element on the diagram has properties. To see the properties of an element, right-click the element on the diagram or in UML Model Explorer and then click Properties. The properties appear in the Properties window.

Note

This topic is about the properties of elements in UML Component Diagrams. For more information about how to read UML Component Diagrams, see UML Component Diagrams: Reference. For more information about how to draw UML Component Diagrams, see UML Component Diagrams: Guidelines.

Properties of Elements

Property Default Element Description
Name A default name All Identifies the element.
Qualified Name Namespace :: Name All Identifies the element uniquely.

A component or type's name is prefixed with the qualified name of the package that contains it.

A part or port's name is prefixed with the qualified name of the component that owns it.
Work Items 0 associated All The number of work items associated with this element. To associate work items, see Link model elements and work items.
Description (none) All You can make general notes about the element here.
Color (default for the type) Component, Part, Delegation, Part assembly The color of the shape. Unlike other properties, this is the color of the shape rather than the model element that the shape displays.
Is Indirectly Instantiated True Component The component exists only as a design artifact. At run time, only its parts exist.
Is Abstract False Component The component definition can be used only as a generalization from which other components can be specialized.
Visibility Public Component, Part, Port Public - globally visible.

Package - visible within the package.

Private - visible within the owning component.

Protected - visible to components derived from the owner.
Type Type on creation Part

Port
The type of a part is a component or class.

The type of a Port is an interface.
Multiplicity 1 Part

Port
Indicates how many instances of the specified type form part of the parent component.

1 - exactly one.

0..1 - one or none.

* - a collection of any number.

n..m - a collection of from n to m instances.
Is Behavior False Port If true, messages to this port are handled by activities or operations that are described as part of the component, instead of its parts.
Is Service False Port If true, this port is part of the published interface of this component.
LinkedPackage Model Diagram The default namespace for elements added to this diagram.

See Also

UML Use Case Diagrams: Reference UML Use Case Diagrams: Guidelines