Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PowerPointMasterSurface

OfficeIMO.PowerPoint

Namespace
OfficeIMO.PowerPoint
Assembly
OfficeIMO.PowerPoint
Source revision
0eef6a5756b9 with working tree changes
Modifiers
abstract

Shared editing surface of a slide master and a slide layout. Shapes, placeholders and the background placed here are inherited by every slide that uses the master or layout.

Inheritance

  • object
  • PowerPointMasterSurface

Derived Types

Methods

AddImage 2 overloads
public PowerPointImage AddImage(string imagePath, OfficeLength left, OfficeLength top, OfficeLength width, OfficeLength height) #

Adds a picture, such as a logo, shown on every slide. The picture keeps its aspect ratio inside the box.

Parameters

imagePath string required
left OfficeIMO.OfficeLength required
top OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
public PowerPointImage AddImage(Stream image, OfficeImageFormat imageType, OfficeLength left, OfficeLength top, OfficeLength width, OfficeLength height) #

Adds a picture from a stream, shown on every slide. The picture keeps its aspect ratio inside the box.

Parameters

image System.IO.Stream required
imageType OfficeIMO.Drawing.OfficeImageFormat required
left OfficeIMO.OfficeLength required
top OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
public PowerPointTextBox AddPlaceholder(PowerPointPlaceholderType placeholderType, PowerPointLayoutBox bounds, uint? index = null, string? name = null) #

Adds a placeholder that slides using this layout (or master) inherit: position, size and text formatting. Title placeholders have no index; other types get the next free index when none is given. Slide number and date placeholders carry their native fields.

Parameters

placeholderType OfficeIMO.PowerPoint.PowerPointPlaceholderType required
bounds OfficeIMO.PowerPoint.PowerPointLayoutBox required
index uint? = null optional
name string? = null optional
public PowerPointAutoShape AddShape(OfficePresetShapeType shapeType, OfficeLength left, OfficeLength top, OfficeLength width, OfficeLength height, string? name = null) #

Adds an auto shape, such as a band or rule, drawn behind slide content on every slide.

Parameters

shapeType OfficeIMO.Drawing.OfficePresetShapeType required
left OfficeIMO.OfficeLength required
top OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
name string? = null optional
public PowerPointTextBox AddTextBox(string text, OfficeLength left, OfficeLength top, OfficeLength width, OfficeLength height) #

Adds fixed text, such as a confidentiality notice, shown on every slide.

Parameters

text string required
left OfficeIMO.OfficeLength required
top OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
public void ClearBackground() #

Removes the local background so the inherited one shows.

public PowerPointTextBox? GetPlaceholder(PowerPointPlaceholderType placeholderType, uint? index = null) #

Returns the first placeholder of the given type and, optionally, index.

Parameters

placeholderType OfficeIMO.PowerPoint.PowerPointPlaceholderType required
index uint? = null optional
SetBackgroundImage 2 overloads
public void SetBackgroundImage(string imagePath) #

Sets a stretched background picture.

Parameters

imagePath string required
public void SetBackgroundImage(Stream image, OfficeImageFormat imageType) #

Sets a stretched background picture from a stream.

Parameters

image System.IO.Stream required
imageType OfficeIMO.Drawing.OfficeImageFormat required

Properties

public string Name { get; set; } #

Display name shown in PowerPoint's Slide Master view.

public IReadOnlyList<PowerPointShape> Shapes { get; } #

Shapes drawn on this master or layout, in drawing order.

public IReadOnlyList<PowerPointTextBox> Placeholders { get; } #

Placeholders defined on this master or layout.

public OfficeColor? BackgroundColor { get; set; } #

Gets or sets a solid background. Setting null removes the local background, so a layout falls back to its master's background.