简体   繁体   English

C#PowerPoint VSTO UndoRecord就像在Word中一样

[英]C# PowerPoint VSTO UndoRecord like in Word

Microsoft Word has the concept of an UndoRecord which allows you to start and end a custom UndoRecord . Microsoft Word具有UndoRecord的概念,该概念使您可以启动和结束自定义UndoRecord

Unfortunately, it does not look like PowerPoint's Application object has the same property. 不幸的是,它看起来不像PowerPoint的Application对象具有相同的属性。

Question : how can you manage the undo/redo state in a PowerPoint VSTO application? 问题 :如何在PowerPoint VSTO应用程序中管理撤消/重做状态?

The use case is that I am performing a number of steps within the slide, which I want to bundle into one undo/redo step. 用例是我要在幻灯片中执行多个步骤,我希望将这些步骤捆绑为一个撤消/重做步骤。

In PowerPoint, you have _Application.StartNewUndoEntry 在PowerPoint中,您有_Application.StartNewUndoEntry

link to msdn 链接到msdn

Just call the method every time you want to add an entry in the undo stack. 每当您要在撤消堆栈中添加条目时,只需调用该方法即可。 You have no control over the name of the entry, or anything else for that matter... 您无法控制条目的名称,或与此相关的任何其他事物。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM