PowerPointMasterSurface
OfficeIMO.PowerPoint
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
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
- left OfficeIMO.OfficeLength
- top OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
Returns
PowerPointImagepublic 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
- imageType OfficeIMO.Drawing.OfficeImageFormat
- left OfficeIMO.OfficeLength
- top OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
Returns
PowerPointImagepublic 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
- bounds OfficeIMO.PowerPoint.PowerPointLayoutBox
- index uint? = null
- name string? = null
Returns
PowerPointTextBoxpublic 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
- left OfficeIMO.OfficeLength
- top OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- name string? = null
Returns
PowerPointAutoShapepublic 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
- left OfficeIMO.OfficeLength
- top OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
Returns
PowerPointTextBoxpublic 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
- index uint? = null
Returns
PowerPointTextBox?public void SetBackgroundImage(string imagePath) #Sets a stretched background picture.
Parameters
- imagePath string
public void SetBackgroundImage(Stream image, OfficeImageFormat imageType) #Sets a stretched background picture from a stream.
Parameters
- image System.IO.Stream
- imageType OfficeIMO.Drawing.OfficeImageFormat
Inherited Methods
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.