ClipboardCommandSet 类

定义

重要

此 API 不符合 CLS。

支持剪切/复制/粘贴操作的 ClipboardCommandSet。

public ref class ClipboardCommandSet abstract : Microsoft::VisualStudio::Modeling::Shell::CommandSetLibrary
[System.CLSCompliant(false)]
public abstract class ClipboardCommandSet : Microsoft.VisualStudio.Modeling.Shell.CommandSetLibrary
[<System.CLSCompliant(false)>]
type ClipboardCommandSet = class
    inherit CommandSetLibrary
Public MustInherit Class ClipboardCommandSet
Inherits CommandSetLibrary
继承
属性

构造函数

ClipboardCommandSet(IServiceProvider)

创建新的 CommandSet

属性

CreateBitmapPreference

返回所需的首选项 (FavorClarityOverSmallSize/FavorSmallSizeOverClarity) 用于创建位图。 默认值为 FavorSmallSizeOverClarity

CurrentDocData

当前焦点文档

(继承自 CommandSetLibrary)
CurrentDocumentSelection

返回活动文档窗口中选定元素的集合。

(继承自 CommandSetLibrary)
CurrentModelingDocView

当前聚焦的文档视图

(继承自 CommandSetLibrary)
CurrentSelection

返回活动窗口中选定元素的集合。 这可能是文档窗口或工具窗口。

(继承自 CommandSetLibrary)
ElementOperations

返回与此 ClipboardCommandSet 关联的 ElementOperations。 如果

MenuService

用于管理命令处理程序的菜单命令服务。

(继承自 CommandSetLibrary)
MonitorSelection

用于跟踪 Visual Studio shell 中的选定内容的服务。

(继承自 CommandSetLibrary)
SelectedElements

返回当前选定的模型元素集, (不是形状)

ServiceProvider

用于检索 Visual Studio 服务的服务提供程序。

(继承自 CommandSetLibrary)
SingleDocumentSelection

返回活动文档窗口中选定的主对象。

(继承自 CommandSetLibrary)
SingleSelection

返回活动窗口中主选定的对象。 这可能是文档窗口或工具窗口。

(继承自 CommandSetLibrary)
TargetElement

返回选定内容中的第一个元素。

方法

CanDeleteSelectedItems()

确定是否可以删除选定项

(继承自 CommandSetLibrary)
CopyModelElementsIntoElementGroupPrototype(IDataObject, IList<ModelElement>)

将 ModelElements 的集合复制到指定的 IDataObject

CreateBitmapForClipboard(IEnumerable<ShapeElement>)

返回暂存到剪贴板的位图。

CreateMetafileForClipboard(IEnumerable<ShapeElement>)

对于给定形状,此方法用于创建剪贴板的增强元文件。 如果您不希望将增强元文件放在剪贴板中,请重写此方法并返回 null。

DeleteSelectedItems(String)

用于删除选定项的受保护方法

(继承自 CommandSetLibrary)
GetMenuCommands()

提供此 commandset 实现的菜单命令

(继承自 CommandSetLibrary)
Initialize()

初始化命令集

(继承自 CommandSetLibrary)
InitializeAsync(CancellationToken) (继承自 CommandSetLibrary)
IsAnyDocumentSelectionCompartment()

返回选择列表中的任何项是否为隔离舱。

(继承自 CommandSetLibrary)
IsAnyDocumentSelectionMoveableHostShape()

返回选择列表中的任何项是否是可移动主机形状,不能将其删除。

(继承自 CommandSetLibrary)
IsAnyDocumentSelectionUndeletable()

返回是否无法删除选择列表中的任何形状项。 基本实现检查分段和 MoveableHostShape 形状。

(继承自 CommandSetLibrary)
IsCurrentDiagramEmpty()

如果关系图没有任何子级,则返回 true。

(继承自 CommandSetLibrary)
IsDiagramSelected() (继承自 CommandSetLibrary)
IsSingleDocumentSelection()

返回活动文档中是否只有一个选定项。

(继承自 CommandSetLibrary)
IsSingleSelection()

返回活动窗口中是否只有一个选定项。 这可能是文档或工具窗口。

(继承自 CommandSetLibrary)
ProcessOnMenuCopyCommand()

复制命令的实现

ProcessOnMenuCutCommand()

"剪切" 命令的实现

ProcessOnMenuPasteCommand()

"粘贴" 命令的实现

ProcessOnStatusCopyCommand(MenuCommand)

用于处理菜单复制操作的虚方法

ProcessOnStatusCutCommand(MenuCommand)

用于处理菜单剪切操作的虚方法

ProcessOnStatusPasteCommand(MenuCommand)

用于处理菜单粘贴操作的虚方法

ResolveExportedShapesForClipboardImages(IDataObject, IEnumerable<ModelElement>)

方法来解析用于作为位图/Emf 文件导出到剪贴板的形状。 使用 DataObject,可以在复制为模型元素的内容和复制为 (图像的内容之间进行一致性,否则,可能会选择两个形状,但不能选择它们之间的连接符,而是复制为元素,而不是作为图像)

适用于