ThmxTheme.Open method (SPSite, String)
Opens the theme package associated with the specified SharePoint Web site and server-relative URL.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function Open ( _
site As SPSite, _
url As String _
) As ThmxTheme
'Usage
Dim site As SPSite
Dim url As String
Dim returnValue As ThmxTheme
returnValue = ThmxTheme.Open(site, url)
public static ThmxTheme Open(
SPSite site,
string url
)
Parameters
site
Type: Microsoft.SharePoint.SPSiteAn SPSite object that identifies the SharePoint Web site to which the theme is applied.
url
Type: System.StringA string providing the server-relative URL.
Return value
Type: Microsoft.SharePoint.Utilities.ThmxTheme
A ThmxTheme object that represents the opened theme.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | url is null . |
Remarks
This method calls the Open(SPFile) method with site.OpenWeb(url, false). GetFile(url).