SPContentType.ReadOnly property

Gets or sets whether the content type is read-only.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property ReadOnly As Boolean
    Get
    Set
'Usage
Dim instance As SPContentType
Dim value As Boolean

value = instance.ReadOnly

instance.ReadOnly = value
public bool ReadOnly { get; set; }

Property value

Type: System.Boolean
true if the content type is read-only; otherwise false.

Remarks

Marking a content type as read-only warns users that they should not make changes to the content type. The user must then explicitly set the read-only property of the content type to false to make changes to the content type.

For more information, see Content Type Change Control.

If you define a content type as read-only, that can have ramifications when you make changes to its parent content type and then attempt to propagate those changes down through the hierarchy. For more information, see Updating Child Content Types.

See also

Reference

SPContentType class

SPContentType members

Microsoft.SharePoint namespace

Other resources

Content Type Change Control

Updating Child Content Types

Introduction to Content Types

Site and List Content Types

Base Content Type Hierarchy