CommandBarControl.Move 方法

将此控件移至指定的命令栏在指定的位置。

命名空间:  Microsoft.VisualStudio.CommandBars
程序集:  Microsoft.VisualStudio.CommandBars(在 Microsoft.VisualStudio.CommandBars.dll 中)

语法

声明
Function Move ( _
    Bar As Object, _
    Before As Object _
) As CommandBarControl
CommandBarControl Move(
    Object Bar,
    Object Before
)

参数

  • Bar
    类型:System.Object
    [in, optional] 移动控件的 MsoControlType 。如果此参数未指定,则默认值为 msoControlButton。
  • Before
    类型:System.Object
    [in, optional] 表示移动的控件的索引的整数。如果此参数未指定,新的控件添加在目标命令栏的末尾。

返回值

类型:Microsoft.VisualStudio.CommandBars.CommandBarControl
移动的控件。

备注

控件的集合在命令栏的 1 开始。

.NET Framework 安全性

请参见

参考

CommandBarControl 接口

Microsoft.VisualStudio.CommandBars 命名空间