SPContentType.Hidden property

Gets or sets whether the content type is hidden on the list’s New menu.

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

public bool Hidden { get; set; }

Property value

Type: System.Boolean
true if the content type is hidden on the list’s New menu; otherwise false.


The value of the ReadOnly property is true.


The value of the Sealed property is true.

You can use this property to specify that a content type be hidden. Hidden content types are not displayed on the New menu for list views. Therefore, users cannot create new items of that content type from the list. The content type is still displayed everywhere else in the user interface.


To change the order in which content types appear on the New menu, set the UniqueContentTypeOrder property.

When you modify the value of this property, your change does not take effect until you call the Update() method. Calling this method commits all modifications to the content type definition back to the SharePoint database.

The following console application prevents one of the content types available in a document library from appearing on the library’s New menu.

using System;
using Microsoft.SharePoint;

namespace Test
    class ConsoleApp
        static void Main(string[] args)
            SPSite oSPSite = new SPSite("http://localhost");
            SPWeb oSPWeb = oSPSite.OpenWeb();

            // Hide a content type from the New menu on a list.
            SPList oList = oSPWeb.Lists["Custom Document Library"];
            SPContentType oContentType = oList.ContentTypes["Content Type Name"];
            if (oContentType.ReadOnly || oContentType.Sealed)
                Console.WriteLine("Content type cannot be modified.");
                oContentType.Hidden = true;
                Console.WriteLine("Content type is now hidden.");


            Console.Write("Press ENTER to continue...");