Condividi tramite


ThmxTheme.ApplyTo Method (SPWeb, Boolean)

Applies the current theme to the given web.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub ApplyTo ( _
    web As SPWeb, _
    shareGenerated As Boolean _
)
'Usage
Dim instance As ThmxTheme
Dim web As SPWeb
Dim shareGenerated As Boolean

instance.ApplyTo(web, shareGenerated)
public void ApplyTo(
    SPWeb web,
    bool shareGenerated
)

Parameters

  • shareGenerated
    Type: System.Boolean

    true if the generated Cascading Style Sheet should be stored at the root web; otherwise, false.

Exceptions

Exception Condition
ArgumentNullException

web is null .

InvalidOperationException

The theme file is invalid.

Remarks

If web is a null reference (Nothing in Visual Basic), this method throws a ArgumentNullException.

See Also

Reference

ThmxTheme Class

ThmxTheme Members

ApplyTo Overload

Microsoft.SharePoint.Utilities Namespace