Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordBackgroundFluent

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Modifiers
static

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 required
The instance.
color OfficeIMO.OfficeColor required
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 required
The instance.
value OfficeIMO.OfficeColor? required
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 required
The instance.
filePath string required
Path to the image file.
width OfficeIMO.OfficeLength? = null optional
Optional physical width of the image.
height OfficeIMO.OfficeLength? = null optional
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 required
The instance.
imageStream System.IO.Stream required
Stream containing image data.
fileName string required
Name of the image file.
width OfficeIMO.OfficeLength? = null optional
Optional physical width of the image.
height OfficeIMO.OfficeLength? = null optional
Optional physical height of the image.

Returns

TSelf The same instance.