Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SPFile.CustomizedPageStatus property

Gets the customization (also known as "ghost") status of the file object.

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

'Declaration
Public ReadOnly Property CustomizedPageStatus As SPCustomizedPageStatus
	Get
'Usage
Dim instance As SPFile
Dim value As SPCustomizedPageStatus

value = instance.CustomizedPageStatus

Property value

Type: Microsoft.SharePoint.SPCustomizedPageStatus
The customized status.

The following example shows how to discover the customized status of master pages for a Web site.

Imports System
Imports Microsoft.SharePoint

Module ConsoleApp

    Sub Main()

        Using site As New SPSite("http://localhost")
            Using web As SPWeb = site.OpenWeb()

                Dim list As SPList = web.GetCatalog(SPListTemplateType.MasterPageCatalog)

                If list IsNot Nothing Then

                    For Each item As SPListItem In list.Items
                        If item.File IsNot Nothing Then
                            Console.WriteLine("Filename: {0, -20} Status: {1}", _
                                item.File.Name, item.File.CustomizedPageStatus)
                        End If
                    Next

                End If

            End Using
        End Using

        Console.Write(vbCrLf & "Press ENTER to continue....")
        Console.Read()
    End Sub

End Module
Show:
© 2015 Microsoft