Programmatically there are no restrictions on what you can do. However you may want to restrict the actions that your users may perform.
The simplest restriction is to set Diagram.IsEnabled to false. Users will not be able to do much of anything.
// Disable the diagram!
diagram.IsEnabled = false;
More common is to set Diagram.IsReadOnly to true. This allows users to scroll and zoom and to select parts, but not to insert or delete or drag or modify parts. (If you want to allow scroll and zoom but not selection, you can disable selection, as discussed below.)
// Disable diagram modifications, but allow navigation and selection
diagram.IsReadOnly = true;
Another possibility is to set Model.IsReadOnly to true. This allows users to scroll, zoom, select, and move parts, but not to insert or delete parts, including not adding or removing links nor adding or removing group members.
The Diagram.IsModelReadOnly property just gets and sets the Model.IsReadOnly property. If you are loading new Models, you will need to set this Diagram property after setting Diagram.Model.
// Disable adding or removing parts
diagram.Model.IsReadOnly = true;
One common situation with diagrams that are Diagram.IsReadOnly is that the user can not collapse or expand trees or subgraphs. Instead of setting Diagram.IsReadOnly, you can set these properties:
palette.IsReadOnly = false;
palette.IsModelReadOnly = false;
palette.AllowDelete = false;
palette.AllowInsert = false;
palette.AllowLink = false;
palette.AllowMove = false;
palette.AllowTextEdit = false;
// maybe other Diagram.Allow... properties too, depending on your templates
// also consider disabling Tools
palette.ToolManager.ContextMenuTool.IsEnabled = false;
More precise restrictions on the user can be imposed by setting properties of the Diagram or of a particular Layer or of a particular Part or GraphObject.
Some restrictions, such as Diagram.AllowZoom, only make sense when applying to the whole diagram. Others may also apply to individual parts, such as Part.Copyable and Layer.AllowCopy corresponding to Diagram.AllowCopy. Finally some may apply to any GraphObject, for example properties for ports such as GraphObject.ToLinkable, or to text objects such as TextBlock.Editable.
Any Tool can be disabled by setting Tool.IsEnabled to false. By default all Tools are enabled, but many cannot run because the conditions are not right for Tool.CanStart to return true.
Here is a listing of what users can do and the properties that limit that functionality. Most of these properties have a default value of true.