PowerPoint.SlideBackgroundGradientFillType enum
Specifies the gradient fill type for a PowerPoint.SlideBackgroundGradientFill.
Remarks
[ API set: PowerPointApi 1.10 ]
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/slide-management/get-set-background-fill.yaml
// Sets the background of the first selected slide to a linear gradient fill.
await PowerPoint.run(async (context) => {
const slide: PowerPoint.Slide = context.presentation.getSelectedSlides().getItemAt(0);
slide.background.fill.setGradientFill({
type: PowerPoint.SlideBackgroundGradientFillType.linear,
} as PowerPoint.SlideBackgroundGradientFillOptions);
await context.sync();
console.log("Background set to linear gradient fill.");
});
Fields
| linear = "Linear" | Linear gradient fill. |
| path = "Path" | Path gradient fill. |
| radial = "Radial" | Radial gradient fill. |
| rectangular = "Rectangular" | Rectangular gradient fill. |
| shadeFromTitle = "ShadeFromTitle" | Shade from title gradient fill. |
| unsupported = "Unsupported" | Unsupported gradient fill. |