次の方法で共有


SPContentType members

Represents a site or list content type.

The SPContentType type exposes the following members.

Constructors

  Name Description
Public method SPContentType(SPContentType, SPContentTypeCollection, String) Initializes a new instance of the SPContentType class using the specified parent content type.
Public method SPContentType(SPContentTypeId, SPContentTypeCollection, String) Initializes a new instance of the SPContentType class using the specified SPContentTypeId structure.

Top

Properties

  Name Description
Public property Description Gets or sets a string that contains a description of the content type.
Public property DescriptionResource Gets or sets a user-defined localizable resource that represents the content type description.
Public property DisplayFormTemplateName Gets or sets the name of a custom Display form template to use for items assigned this content type.
Public property DisplayFormUrl Gets or set the URL of a custom Display form page to use for items assigned this content type.
Public property DocumentTemplate Gets or sets the document template for the content type.
Public property DocumentTemplateUrl Gets or sets the URL to the content type’s document template.
Public property EditFormTemplateName Gets or sets the name of a custom Edit form template to use for items assigned this content type.
Public property EditFormUrl Gets or set the URL of a custom Edit form page to use for items assigned this content type.
Public property EventReceivers Gets the collection of event receiver definitions for the content type.
Public property FeatureId Gets the identifier of the Feature that created the content type.
Public property FieldLinks Gets an SPFieldLinkCollection that represents the collection of column, or field, references in the content type.
Public property Fields Gets an SPFieldCollection that represents collection of column references included in the content type.
Public property Group Gets and sets the content type group to which the content type is assigned.
Public property Hidden Gets or sets whether the content type is hidden on the list’s New menu.
Public property Id Gets an SPContentTypeId object that represents the content type identifier (ID) of the content type.
Public property JSLink Gets or sets the JSLink for the content type custom form template
Public property MobileDisplayFormUrl Gets or set the URL of a custom mobile Display form page to use for items assigned this content type.
Public property MobileEditFormUrl Gets or set the URL of a custom mobile Edit form page to use for items assigned this content type.
Public property MobileNewFormUrl Gets or set the URL of a custom mobile New form page to use for items assigned this content type.
Public property Name Gets or sets the content type name.
Public property NameResource Gets an SPUserResource object that represents the translations of the name of the content type.
Public property NewDocumentControl Gets or sets a string that identifies the application used to create new documents.
Public property NewFormTemplateName Gets or sets the name of a custom New form template to use for items assigned this content type.
Public property NewFormUrl Gets or set the URL of a custom New form page to use for items assigned this content type.
Public property Parent Gets the parent content type of this content type.
Public property ParentList Gets an SPList object that represents the list in which this SPContentType object resides.
Public property ParentWeb Gets the parent Web site for the content type.
Public property ReadOnly Gets or sets whether the content type is read-only.
Public property RequireClientRenderingOnNew Indicates whether the client is responsible for rendering a new document when it is created.
Public property ResourceFolder Gets the content type's resource folder.
Public property SchemaXml Gets the XML schema that defines the content type.
Public property SchemaXmlWithResourceTokens Gets a non-localized version of the XML schema that defines the content type.
Public property Scope Gets a server-relative URL for the highest level within the scope of a particular content type.
Public property Sealed Gets or sets whether the content type can be modified.
Public property Version Gets the version of the content type.
Public property WorkflowAssociations Gets an SPWorkflowAssociationCollection object that represents the workflow associations for this content type.
Public property XmlDocuments Gets an SPXmlDocumentCollection that represents the XML documents that are stored within the content type.

Top

Methods

  Name Description
Public method AddWorkflowAssociation Obsolete. Use the WorkflowAssociations.Add method.
Public method Delete Deletes the content type.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetLocalizations Returns the collection of localizations for the content type for the specified culture.
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method RemoveWorkflowAssociation Obsolete. Use the WorkflowAssociations.Remove method.
Public method ToString (Inherited from Object.)
Public method Update() Updates the content type definition that is stored in the database with any changes you have made programmatically.
Public method Update(Boolean) Updates the content type definition that is stored in the database and, optionally, updates all content types that inherit from this content type.
Public method Update(Boolean, Boolean) Updates the content type definition that is stored in the database, optionally updates all content types that inherit from this content type, and optionally throws an exception when it encounters a child content type that cannot be modified.
Public method UpdateIncludingSealedAndReadOnly Commits changes to the content type into the database and applies changes to all derived content types, including content types that are sealed or read-only.
Public method UpdateWorkflowAssociation Obsolete. Use the WorkflowAssociations.Update method.
Public method UpdateWorkflowAssociationsOnChildren() Propagates changes in this content type’s workflow associations to content types that are derived from this content type and also to instances of this content type that have been applied to lists.
Public method UpdateWorkflowAssociationsOnChildren(Boolean) Propagates changes in this content type’s workflow associations to content types that are derived from this content type and also to instances of this content type that have been applied to lists. Optionally flags objects touched by the operation as changed.
Public method UpdateWorkflowAssociationsOnChildren(Boolean, Boolean, Boolean) Propagates changes in this content type’s workflow associations to content types that are derived from this content type, or to instances of this content type that have been applied to lists, or to both. Optionally flags objects touched by the operation as changed.
Public method UpdateWorkflowAssociationsOnChildren(Boolean, Boolean, Boolean, Boolean) Propagates changes in this content type’s workflow associations to content types that are derived from this content type or to instances of this content type that have been applied to lists, or to both. Optionally marks objects touched by the operation as changed. Also optionally suppresses exceptions that are thrown because a child is either sealed or read-only.
Public methodStatic member ValidateName Confirms whether a string is acceptable as the name for a content type.

Top

See also

Reference

SPContentType class

Microsoft.SharePoint namespace