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)

Public ReadOnly Property CustomizedPageStatus As SPCustomizedPageStatus
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

                End If

            End Using
        End Using

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

End Module