SPWeb.ApplyTheme method (String, String, String, Boolean)

Applies a theme with the specified components to this site.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


Public Sub ApplyTheme ( _
    colorPaletteUrl As String, _
    fontSchemeUrl As String, _
    backgroundImageUrl As String, _
    shareGenerated As Boolean _
Dim instance As SPWeb
Dim colorPaletteUrl As String
Dim fontSchemeUrl As String
Dim backgroundImageUrl As String
Dim shareGenerated As Boolean

instance.ApplyTheme(colorPaletteUrl, _
    fontSchemeUrl, backgroundImageUrl, _
public void ApplyTheme(
    string colorPaletteUrl,
    string fontSchemeUrl,
    string backgroundImageUrl,
    bool shareGenerated


  • colorPaletteUrl
    Type: System.String

    The site collection server relative URL of the color palette file.


    .spcolor files can only be used within the same site collection where it resides.

  • fontSchemeUrl
    Type: System.String

    The server-relative URL of the font scheme, or null for no font scheme.

  • backgroundImageUrl
    Type: System.String

    The server-relative URL of the background image, or null for no background image.

  • shareGenerated
    Type: System.Boolean

    true if the generated theme files should be placed in the root web, false to store them in this web.

See also


SPWeb class

SPWeb members

ApplyTheme overload

Microsoft.SharePoint namespace