CommonSlideViewProperties
CommonSlideViewProperties class
表示常见幻灯片视图属性。
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);
}