Class
WordBackgroundFluent
OfficeIMO.Word
The fluent methods of WordBackground, generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.
Inheritance
- object
- WordBackgroundFluent
Methods
Color``1 2 overloads
public static TSelf Color<TSelf>(TSelf wordBackground, OfficeColor color) #Sets the background color using a OfficeColor.
Type Parameters
- TSelf
Parameters
- wordBackground TSelf
- The instance.
- color OfficeIMO.OfficeColor
- Color value.
Returns
TSelf The same instance.public static TSelf Color<TSelf>(TSelf wordBackground, OfficeColor? value) #Sets WordBackground.Color: Gets or sets the background color; automatic or missing colours return null.
Type Parameters
- TSelf
Parameters
- wordBackground TSelf
- The instance.
- value OfficeIMO.OfficeColor?
- The value.
Returns
TSelf The same instance.Examples
// C# initializer or property // C# fluent
wordBackground.Color = value; wordBackground.Color(value);Image``1 2 overloads
public static TSelf Image<TSelf>(TSelf wordBackground, string filePath, OfficeLength? width = null, OfficeLength? height = null) #Sets the background image for the document.
Type Parameters
- TSelf
Parameters
- wordBackground TSelf
- The instance.
- 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.
Returns
TSelf The same instance.public static TSelf Image<TSelf>(TSelf wordBackground, Stream imageStream, string fileName, OfficeLength? width = null, OfficeLength? height = null) #Sets the background image for the document.
Type Parameters
- TSelf
Parameters
- wordBackground TSelf
- The instance.
- 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.
Returns
TSelf The same instance.