This topic has not yet been rated - Rate this topic

ThmxTheme.Open Method (SPSite, String)

SharePoint 2010

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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public static ThmxTheme Open(
	SPSite site,
	string url
)

Parameters

site
Type: Microsoft.SharePoint.SPSite
An SPSite object that identifies the SharePoint Web site to which the theme is applied.
url
Type: System.String
A string providing the server-relative URL.

Return Value

Type: Microsoft.SharePoint.Utilities.ThmxTheme
A ThmxTheme object that represents the opened theme.
Exception Condition
ArgumentNullException

url is null.

This method calls the Open(SPFile) method with site.OpenWeb(url, false). GetFile(url).

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ