Display of Read-Only Information (Class Designer)

Class Designer and the Class Details window can display the types (and members of types) for the following:

  • a project that contains a class diagram

  • a project referenced from a project that contains a class diagram

  • an assembly referenced from a project that contains a class diagram

In the latter two cases, the referenced entity (a type or member) is read-only in the class diagram that represents it.

An entire project or portions of it, such as individual files, may be read-only. The most common cases in which a project or one of its files is read-only are when it is under source-code control (and not checked out), it exists in an external assembly, or when the operating system considers the files to be read-only.

Source-Code Control

Because a class diagram is saved as a file in a project, you need to check out the project in order to save any changes you make in Class Designer or the Class Details window.

If you do not check out the project, you can still save a class diagram that describes the project, but not as part of the project.

Read-Only Projects

The project may be read-only for a reason other than source-code control. Closing the project displays a dialog box asking whether to overwrite the project file, discard changes (don’t save) or cancel the close operation. If you choose to overwrite, project files are overwritten and made read-write. The new class diagram file is added.

Read-Only Types

If you try to save a project containing a type whose source-code file is read-only, the Save of Read-Only File dialog box appears, which gives you choices to save the file under a new name or new location, or to overwrite the read-only file. If you overwrite the file, the new copy is no longer read-only.

If a code file contains a syntax error, shapes displaying code in that file will be temporarily read-only until the syntax error is fixed. Shapes in this state display red text and a red icon which displays a tooltip reading "The source code file contains a parse error".

A referenced type (such as a .NET Framework type), which exists under another project node or under a referenced-assembly node, is indicated on the Class Designer design surface as read-only. A local type, which exists in the project you have open, is read-write, and its shape on the Class Designer design surface is indicated as such.

Indexers are read-write in code and the Class Details window, but the indexer name is read-only.

You cannot edit partial methods by using the Class Designer or the Class Details window; you must use the Code Editor to edit them.

You cannot edit native C++ code by using the Class Designer or the Class Details window; you must use the Code Editor to edit native C++ code.

See Also

Concepts

Class Details Window Usage Notes (Class Designer)