Table of Contents

Interface IHeaderOptions

Namespace
PnP.Core.Model.SharePoint
Assembly
PnP.Core.dll

Options to configure a the site header chrome

public interface IHeaderOptions

Properties

Emphasis

Gets or sets the value of the header emphasis.

VariantThemeType Emphasis { get; set; }

Property Value

VariantThemeType

HideTitle

Gets or sets a value that specifies whether the title in header is hidden on the site.

bool HideTitle { get; set; }

Property Value

bool

Layout

Gets or sets the value of the header layout.

HeaderLayoutType Layout { get; set; }

Property Value

HeaderLayoutType

LogoAlignment

Gets or sets the logo alignment of the site.

LogoAlignment LogoAlignment { get; set; }

Property Value

LogoAlignment

Methods

ClearHeaderBackgroundImage()

Clears the header background image

void ClearHeaderBackgroundImage()

ClearHeaderBackgroundImageAsync()

Clears the header background image

Task ClearHeaderBackgroundImageAsync()

Returns

Task

Sets the out of the box site's logo again. For group connected sites calling this method is equal to calling ResetSiteLogoThumbnail as logo and logo thumbnail are both set the same.

void ResetSiteLogo()

ResetSiteLogoAsync()

Sets the out of the box site's logo again. For group connected sites calling this method is equal to calling ResetSiteLogoThumbnail as logo and logo thumbnail are both set the same.

Task ResetSiteLogoAsync()

Returns

Task

ResetSiteLogoThumbnail()

Sets the out of the box site's logo thumbnail again. For group connected sites we'll default to using siteassets/siteIcon.jpg if that still exists.

void ResetSiteLogoThumbnail()

ResetSiteLogoThumbnailAsync()

Sets the out of the box site's logo thumbnail again. For group connected sites we'll default to using siteassets/siteIcon.jpg if that still exists.

Task ResetSiteLogoThumbnailAsync()

Returns

Task

SetHeaderBackgroundImage(string, Stream, double, double, bool)

Sets the site's header background image. Only can be called when the header layout is set to extended.

void SetHeaderBackgroundImage(string fileName, Stream content, double focalX = 0, double focalY = 0, bool overwrite = false)

Parameters

fileName string

Name of your image file

content Stream

The contents of the file

focalX double

X axis focal point for the header image

focalY double

Y axis focal point for the header image

overwrite bool

Indicates whether the file should be overwritten if already existing.

SetHeaderBackgroundImageAsync(string, Stream, double, double, bool)

Sets the site's header background image. Only can be called when the header layout is set to extended.

Task SetHeaderBackgroundImageAsync(string fileName, Stream content, double focalX = 0, double focalY = 0, bool overwrite = false)

Parameters

fileName string

Name of your image file

content Stream

The contents of the file

focalX double

X axis focal point for the header image

focalY double

Y axis focal point for the header image

overwrite bool

Indicates whether the file should be overwritten if already existing.

Returns

Task

SetSiteLogo(string, Stream, bool)

Sets the site's logo to the provided image. For group connected sites calling this method is equal to calling SetSiteLogoThumbnail as logo and logo thumbnail are both set the same.

void SetSiteLogo(string fileName, Stream content, bool overwrite = false)

Parameters

fileName string

Name of your image file

content Stream

The contents of the file

overwrite bool

Indicates whether the file should be overwritten if already existing.

SetSiteLogoAsync(string, Stream, bool)

Sets the site's logo to the provided image. For group connected sites calling this method is equal to calling SetSiteLogoThumbnail as logo and logo thumbnail are both set the same.

Task SetSiteLogoAsync(string fileName, Stream content, bool overwrite = false)

Parameters

fileName string

Name of your image file

content Stream

The contents of the file

overwrite bool

Indicates whether the file should be overwritten if already existing.

Returns

Task

SetSiteLogoThumbnail(string, Stream, bool)

Sets the site's logo thumbnail to the provided image. For group connected sites setting the logo thumbnail will also automatically update the site logo.

void SetSiteLogoThumbnail(string fileName, Stream content, bool overwrite = false)

Parameters

fileName string

Name of your image file

content Stream

The contents of the file. Image should in a square aspect ratio

overwrite bool

Indicates whether the file should be overwritten if already existing.

SetSiteLogoThumbnailAsync(string, Stream, bool)

Sets the site's logo thumbnail to the provided image.

Task SetSiteLogoThumbnailAsync(string fileName, Stream content, bool overwrite = false)

Parameters

fileName string

Name of your image file

content Stream

The contents of the file. Image should in a square aspect ratio

overwrite bool

Indicates whether the file should be overwritten if already existing.

Returns

Task