Class
WordBackground
OfficeIMO.Word
Represents the document background settings.
Inheritance
- object
- WordBackground
Usage
Explore 3 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
- Method WordBackground.SetColor
- Method WordBackground.SetImage
- Property WordDocument.Background
Constructors
WordBackground 2 overloads
public WordBackground(WordDocument document) #Creates a background manager for the specified document.
Parameters
- document OfficeIMO.Word.WordDocument
- Parent document.
public WordBackground(WordDocument document, OfficeColor color) #Creates a background with the specified color.
Parameters
- document OfficeIMO.Word.WordDocument
- Parent document.
- color OfficeIMO.OfficeColor
- Initial color.
Methods
public WordBackground SetColor(OfficeColor color) #Sets the background color using a OfficeColor.
Parameters
- color OfficeIMO.OfficeColor
- Color value.
SetImage 2 overloads
public WordBackground SetImage(string filePath, OfficeLength? width = null, OfficeLength? height = null) #Sets the background image for the document.
Parameters
- filePath string
- Path to the image file.
- width OfficeIMO.OfficeLength? = null
- Optional physical width of the image.
- height OfficeIMO.OfficeLength? = null
- Optional physical height of the image.
public WordBackground SetImage(Stream imageStream, string fileName, OfficeLength? width = null, OfficeLength? height = null) #Sets the background image for the document.
Parameters
- imageStream System.IO.Stream
- Stream containing image data.
- fileName string
- Name of the image file.
- width OfficeIMO.OfficeLength? = null
- Optional physical width of the image.
- height OfficeIMO.OfficeLength? = null
- Optional physical height of the image.
Inherited Methods
Properties
public OfficeColor? Color { get; set; } #Gets or sets the background color; automatic or missing colours return null.