CommandBarControl.Copy 方法
复制此控件绑定到指定的命令栏中的指定位置。
命名空间: Microsoft.VisualStudio.CommandBars
程序集: Microsoft.VisualStudio.CommandBars(在 Microsoft.VisualStudio.CommandBars.dll 中)
语法
声明
Function Copy ( _
Bar As Object, _
Before As Object _
) As CommandBarControl
CommandBarControl Copy(
Object Bar,
Object Before
)
参数
- Bar
类型:System.Object
[in, optional] 新控件的 MsoControlType 。如果此参数未指定,则默认值为 msoControlButton
- Before
类型:System.Object
[in, optional] 表示复制的控件的索引的整数。如果此参数未指定,新的控件添加在目标命令栏的末尾。
返回值
类型:Microsoft.VisualStudio.CommandBars.CommandBarControl
控件的副本。
备注
控件的集合在命令栏的 1 开始。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。