CommonSlideViewProperties

CommonSlideViewProperties 类

表示通用幻灯片视图属性。

public class CommonSlideViewProperties : ICommonSlideViewProperties

属性

名称描述
DrawingGuides { get; }返回绘图参考线的集合。只读 IDrawingGuidesCollection
Scale { get; set; }指定视图缩放比例,单位为百分比。可读写 Int32.
VariableScale { get; set; }指定视图内容应自动缩放以最佳适应当前窗口大小。可读写 Boolean.

示例

以下示例展示了如何为 PowerPoint 演示文稿的幻灯片设置缩放值。

[C#]
// 实例化一个表示演示文件的 Presentation 对象
using (Presentation presentation = new Presentation("demo.pptx"))
{
    // 设置演示文稿的视图属性
    presentation.ViewProperties.SlideViewProperties.Scale = 100; // 幻灯片视图的缩放值(百分比)
	presentation.ViewProperties.NotesViewProperties.Scale = 100; // 注释视图的缩放值(百分比)
    presentation.Save("Zoom_out.pptx", SaveFormat.Pptx);
}

另见