Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OdgBackground

OfficeIMO.OpenDocument

Namespace
OfficeIMO.OpenDocument
Assembly
OfficeIMO.OpenDocument
Source revision
1f76172c94d1 with working tree changes
Modifiers
sealed

XML-backed background paint in a page or master's drawing-page style chain.

Inheritance

  • object
  • OdgBackground

Remarks

Page declarations override master paint except for native no-fill, which retains the master. Master edits affect all referencing pages. Referenced gradient definitions and image bytes remain shared.

Usage

Explore 2 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 2

Methods

public byte[] GetBitmapBytes() #

Returns embedded bitmap source bytes without fetching linked content.

Returns

byte[]
public void SetBitmap(byte[] data, string fileName = "background.png") #

Embeds a supported raster and selects stretched bitmap fill without changing opacity or paint area.

Parameters

data byte[] required
fileName string = "background.png" optional
public void UseNoFill() #

Selects native no-fill, retaining inactive declarations and resource definitions.

Properties

public string? FillMode { get; } #

Resolved native fill token in this owner's style chain, or null when absent. It does not include the other owner's paint.

public OdfColor? FillColor { get; set; } #

Resolved solid fill color, or null for another fill mode. Setting null selects native no-fill.

public string? FillGradientName { get; set; } #

Resolved gradient binding, or null for another fill mode. Setting null selects native no-fill.

public double? FillOpacity { get; set; } #

Uniform opacity from zero to one in this owner's style chain. Null removes the local override.

public int? GradientStepCount { get; set; } #

Resolved native gradient band count. Zero means automatic; three or more means fixed bands. Null removes the local override.

public string? FillImageName { get; } #

Resolved bitmap definition name, or null for another fill mode.