ThmxTheme.Open method (SPFile, Boolean, FileMode, FileAccess)
Opens the specified theme package using the provided values for version, file mode, and file access.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function Open ( _
themeFile As SPFile, _
readPublishedVersion As Boolean, _
mode As FileMode, _
access As FileAccess _
) As ThmxTheme
'Usage
Dim themeFile As SPFile
Dim readPublishedVersion As Boolean
Dim mode As FileMode
Dim access As FileAccess
Dim returnValue As ThmxTheme
returnValue = ThmxTheme.Open(themeFile, _
readPublishedVersion, mode, access)
public static ThmxTheme Open(
SPFile themeFile,
bool readPublishedVersion,
FileMode mode,
FileAccess access
)
Parameters
themeFile
Type: Microsoft.SharePoint.SPFileThe theme package to be opened.
readPublishedVersion
Type: System.Booleantrue specifies that the current published package be opened; false specifies that the latest version of the package be opened.
mode
Type: System.IO.FileModeThe file mode in which the theme package is to be opened.
access
Type: System.IO.FileAccessThe file access with which the theme package is to be opened.
Return value
Type: Microsoft.SharePoint.Utilities.ThmxTheme
A ThmxTheme object that represents the opened theme.
Remarks
If readPublishedVersion is true, the current published version is used even if the context user has rights to a later draft version.