# WordBackgroundFluent

The fluent methods of WordBackground, generated from its public properties: A property-named method sets a property and a singular-named method adds…

Class 

`OfficeIMO.Word`

**Namespace**

`OfficeIMO.Word`

**Assembly**

`OfficeIMO.Word`

**Modifiers**

static

The fluent methods of [WordBackground](/api/word/officeimo-word-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

Filter members 

Show inherited

## Methods

Color``1 2 overloads

`public static TSelf Color<TSelf>(TSelf wordBackground, OfficeColor color)` [#](#method-color-officeimo-officecolor)

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)` [#](#method-color-nullable-officeimo-officecolor)

Sets [WordBackground.Color](/api/word/officeimo-word-wordbackground/): 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

```csharp
// 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)` [#](#method-image-string-nullable-officeimo-officelength-nullable-officeimo-officelength)

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)` [#](#method-image-io-stream-string-nullable-officeimo-officelength-nullable-officeimo-officelength)

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.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:723151D95BF45C0D7B462F68F0BD07102571A7EEFB87CBCCEAFA18AD8F9A7D48 -->
