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
HideTitle
Gets or sets a value that specifies whether the title in header is hidden on the site.
bool HideTitle { get; set; }
Property Value
Layout
Gets or sets the value of the header layout.
HeaderLayoutType Layout { get; set; }
Property Value
LogoAlignment
Gets or sets the logo alignment of the site.
LogoAlignment LogoAlignment { get; set; }
Property Value
Methods
ClearHeaderBackgroundImage()
Clears the header background image
void ClearHeaderBackgroundImage()
ClearHeaderBackgroundImageAsync()
Clears the header background image
Task ClearHeaderBackgroundImageAsync()
Returns
ResetSiteLogo()
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
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
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
fileNamestringName of your image file
contentStreamThe contents of the file
focalXdoubleX axis focal point for the header image
focalYdoubleY axis focal point for the header image
overwriteboolIndicates 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
fileNamestringName of your image file
contentStreamThe contents of the file
focalXdoubleX axis focal point for the header image
focalYdoubleY axis focal point for the header image
overwriteboolIndicates whether the file should be overwritten if already existing.
Returns
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
fileNamestringName of your image file
contentStreamThe contents of the file
overwriteboolIndicates 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
fileNamestringName of your image file
contentStreamThe contents of the file
overwriteboolIndicates whether the file should be overwritten if already existing.
Returns
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
fileNamestringName of your image file
contentStreamThe contents of the file. Image should in a square aspect ratio
overwriteboolIndicates 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
fileNamestringName of your image file
contentStreamThe contents of the file. Image should in a square aspect ratio
overwriteboolIndicates whether the file should be overwritten if already existing.